WinAdapter.h defines CROSS_PLATFORM_UUIDOF for non-WIN32 platforms unless the compiler is clang.
@@ -23,7 +23,10 @@
#endif
-#ifdef _WIN32
+#ifndef _WIN32
+#include <dlfcn.h>
+#include "dxc/Support/WinAdapter.h"
+#endif
#ifndef CROSS_PLATFORM_UUIDOF
// Warning: This macro exists in WinAdapter.h as well
@@ -31,12 +34,6 @@
struct __declspec(uuid(spec)) interface;
-#else
-
-#include <dlfcn.h>
-#include "dxc/Support/WinAdapter.h"
-#endif
struct IMalloc;
struct IDxcIncludeHandler;