mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-07 00:29:15 +00:00
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]
This commit is contained in:
parent
5f1a34bba3
commit
c4c8f59284
Notes:
sideshowbarker
2024-07-19 17:11:43 +09:00
Author: https://github.com/blishko
Commit: c4c8f59284
Pull-request: https://github.com/SerenityOS/serenity/pull/11233
1 changed files with 1 additions and 1 deletions
|
@ -25,7 +25,7 @@ StackInfo::StackInfo()
|
||||||
perror("get_stack_bounds");
|
perror("get_stack_bounds");
|
||||||
VERIFY_NOT_REACHED();
|
VERIFY_NOT_REACHED();
|
||||||
}
|
}
|
||||||
#elif __linux__
|
#elif defined(__linux__)
|
||||||
int rc;
|
int rc;
|
||||||
pthread_attr_t attr = {};
|
pthread_attr_t attr = {};
|
||||||
if ((rc = pthread_getattr_np(pthread_self(), &attr)) != 0) {
|
if ((rc = pthread_getattr_np(pthread_self(), &attr)) != 0) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue