Skip to content

Commit 256b7cc

Browse files
committed
Clang does not support #pragma section...
1 parent ccece7f commit 256b7cc

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

lib/Common/Core/GlobalSecurityPolicy.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
#include "CommonCorePch.h"
77

8+
#ifdef _WIN32
9+
810
#include <VersionHelpers.h>
911

1012

@@ -153,3 +155,4 @@ DECLSPEC_GUARDNOCF GlobalSecurityPolicy::SetProcessValidCallTargets(HANDLE hProc
153155
return GlobalSecurityPolicy::readOnlyData.pfnSetProcessValidCallTargets(hProcess, virtualAddress, regionSize, numberOfOffsets, offsetInformation);
154156
}
155157
#endif //_CONTROL_FLOW_GUARD
158+
#endif // _WIN32

lib/Common/Core/GlobalSecurityPolicy.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
class GlobalSecurityPolicy : private DelayLoadLibrary
1010
{
1111
public:
12+
#ifdef _WIN32
1213
#if defined(_CONTROL_FLOW_GUARD)
1314
typedef BOOL FNCGetMitigationPolicyForProcess(HANDLE, PROCESS_MITIGATION_POLICY, PVOID, SIZE_T);
1415
typedef FNCGetMitigationPolicyForProcess* PFNCGetMitigationPolicyForProcess;
@@ -42,4 +43,7 @@ class GlobalSecurityPolicy : private DelayLoadLibrary
4243
} readOnlyData;
4344

4445
static bool InitIsCFGEnabled();
46+
#else
47+
static bool IsCFGEnabled() { return false; }
48+
#endif
4549
};

0 commit comments

Comments
 (0)