[GWP-ASan] Include <unistd.h> for sysconf(_SC_PAGESIZE) (#155261) This fixes build failures on Fuchsia that started with #153860 GitOrigin-RevId: c05567842b73a2286ba6d84cac09693d41f0c838
diff --git a/tests/basic.cpp b/tests/basic.cpp index 7d36a2e..ec2cacc 100644 --- a/tests/basic.cpp +++ b/tests/basic.cpp
@@ -8,6 +8,8 @@ #include "gwp_asan/tests/harness.h" +#include <unistd.h> + TEST_F(CustomGuardedPoolAllocator, BasicAllocation) { InitNumSlots(1); void *Ptr = GPA.allocate(1);
diff --git a/tests/never_allocated.cpp b/tests/never_allocated.cpp index 37a4b38..6e1ee47 100644 --- a/tests/never_allocated.cpp +++ b/tests/never_allocated.cpp
@@ -12,6 +12,8 @@ #include "gwp_asan/crash_handler.h" #include "gwp_asan/tests/harness.h" +#include <unistd.h> + TEST_P(BacktraceGuardedPoolAllocatorDeathTest, NeverAllocated) { size_t PageSize = sysconf(_SC_PAGESIZE);