From bb532d832d1ea8bf078aa8de70fc0a4aec555630 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Tue, 6 Jun 2017 23:28:01 +0000 Subject: [PATCH] Fix the includes in lib/Fuzzer on Windows that have ordering dependencies and add comments to tell future maintainers about those requirements. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304843 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Fuzzer/FuzzerExtFunctionsDlsymWin.cpp | 4 +++- lib/Fuzzer/FuzzerUtilWindows.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/Fuzzer/FuzzerExtFunctionsDlsymWin.cpp b/lib/Fuzzer/FuzzerExtFunctionsDlsymWin.cpp index f6c7e07..321b3ec 100644 --- a/lib/Fuzzer/FuzzerExtFunctionsDlsymWin.cpp +++ b/lib/Fuzzer/FuzzerExtFunctionsDlsymWin.cpp @@ -13,9 +13,11 @@ #include "FuzzerExtFunctions.h" #include "FuzzerIO.h" -#include "Psapi.h" #include "Windows.h" +// This must be included after Windows.h. +#include "Psapi.h" + namespace fuzzer { ExternalFunctions::ExternalFunctions() { diff --git a/lib/Fuzzer/FuzzerUtilWindows.cpp b/lib/Fuzzer/FuzzerUtilWindows.cpp index 8d0678d..25ac976 100644 --- a/lib/Fuzzer/FuzzerUtilWindows.cpp +++ b/lib/Fuzzer/FuzzerUtilWindows.cpp @@ -12,7 +12,6 @@ #if LIBFUZZER_WINDOWS #include "FuzzerIO.h" #include "FuzzerInternal.h" -#include #include #include #include @@ -24,6 +23,9 @@ #include #include +// This must be included after windows.h. +#include + namespace fuzzer { static const FuzzingOptions* HandlerOpt = nullptr; -- 2.34.1