Skip to content

Commit c055678

Browse files
authored
[GWP-ASan] Include <unistd.h> for sysconf(_SC_PAGESIZE) (#155261)
This fixes build failures on Fuchsia that started with #153860
1 parent 8e4d2b5 commit c055678

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

compiler-rt/lib/gwp_asan/tests/basic.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
#include "gwp_asan/tests/harness.h"
1010

11+
#include <unistd.h>
12+
1113
TEST_F(CustomGuardedPoolAllocator, BasicAllocation) {
1214
InitNumSlots(1);
1315
void *Ptr = GPA.allocate(1);

compiler-rt/lib/gwp_asan/tests/never_allocated.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
#include "gwp_asan/crash_handler.h"
1313
#include "gwp_asan/tests/harness.h"
1414

15+
#include <unistd.h>
16+
1517
TEST_P(BacktraceGuardedPoolAllocatorDeathTest, NeverAllocated) {
1618
size_t PageSize = sysconf(_SC_PAGESIZE);
1719

0 commit comments

Comments
 (0)