Skip to content

Comments

fix cpu affinity check#376

Merged
doubaokun merged 2 commits intoopenswoole:masterfrom
remicollet:issue-aff
Feb 4, 2025
Merged

fix cpu affinity check#376
doubaokun merged 2 commits intoopenswoole:masterfrom
remicollet:issue-aff

Conversation

@remicollet
Copy link
Contributor

Same as swoole/swoole-src#5624

Without _GNU_SOURCE,

configure:13553: checking for cpu affinity
configure:13577: cc -c  -O2 -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64   -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer   conftest.c >&5
conftest.c: In function 'main':
conftest.c:50:9: error: implicit declaration of function 'CPU_ZERO' [-Wimplicit-function-declaration]
   50 |         CPU_ZERO(&cpu_set);
      |         ^~~~~~~~
configure:13577: $? = 1

Fix happen with recent GCC version 14.2 when implicit-function-declaration is now an error.

@remicollet
Copy link
Contributor Author

Second fix is for "syscall" and related to -std=c99

See https://www.spinics.net/lists/gcchelp/msg40366.html

Those functions are defined by POSIX and are not part of the C
standard, so if you tell GCC to compile in strict C99 mode (e.g. with
-std=c99) then in general you don't get non-standard declarations.

@doubaokun doubaokun merged commit 525c247 into openswoole:master Feb 4, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants