Skip to content

Commit a42c0c8

Browse files
committed
[builtins] Update HAVE_SYSCONF configure check to adapt CMake [NFC]
The cleans up the HAVE_SYSCONF check in enable_execute_stack.c from 2dbae9c and 40268af. Those two commits were made when the CMake build system was not ready yet.
1 parent 9f80ecb commit a42c0c8

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

compiler-rt/lib/builtins/enable_execute_stack.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@
1212
#include <sys/mman.h>
1313
#endif
1414

15-
// #include "config.h"
16-
// FIXME: CMake - include when cmake system is ready.
17-
// Remove #define HAVE_SYSCONF 1 line.
18-
#define HAVE_SYSCONF 1
19-
2015
#ifdef _WIN32
2116
#define WIN32_LEAN_AND_MEAN
2217
#include <windows.h>
@@ -54,7 +49,7 @@ COMPILER_RT_ABI void __enable_execute_stack(void *addr) {
5449
#error "HAVE_SYSCONF not defined! See enable_execute_stack.c"
5550
#else
5651
const uintptr_t pageSize = sysconf(_SC_PAGESIZE);
57-
#endif // __APPLE__
52+
#endif
5853

5954
const uintptr_t pageAlignMask = ~(pageSize - 1);
6055
uintptr_t p = (uintptr_t)addr;

0 commit comments

Comments
 (0)