From c4c8f59284c5d961ec026e73a93e56e2bbd3b1dd Mon Sep 17 00:00:00 2001 From: Martin Blicha Date: Sun, 12 Dec 2021 19:27:55 +0100 Subject: [PATCH] AK: Fix preprocessor OS check Instead of checking __linux__ macro directly, the code should check if this macro is defined. This is already done correctly a couple of lines above. I ran into this when trying to build libjs-test262 on MacOS where I got the following error message error: "__linux__" is not defined, evaluates to 0 [-Werror=undef] --- AK/StackInfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AK/StackInfo.cpp b/AK/StackInfo.cpp index c7bd8aea41..d77e757e5b 100644 --- a/AK/StackInfo.cpp +++ b/AK/StackInfo.cpp @@ -25,7 +25,7 @@ StackInfo::StackInfo() perror("get_stack_bounds"); VERIFY_NOT_REACHED(); } -#elif __linux__ +#elif defined(__linux__) int rc; pthread_attr_t attr = {}; if ((rc = pthread_getattr_np(pthread_self(), &attr)) != 0) {