ap_log_error: Include ap_config_auto.h to define _GNU_SOURCE#496
Conversation
gettid() needs _GNU_SOURCE defined which is provided by ap_config_auto.h Fixes buildroot error: http://autobuild.buildroot.net/results/2f6/2f6b7bbb4c97e4c91b3abd6bb205e237e57045fa//build-end.log log.c: In function 'log_tid': log.c:637:21: error: implicit declaration of function 'gettid'; did you mean 'getgid'? [-Wimplicit-function-declaration] 637 | pid_t tid = gettid();
|
What glibc version is used there? |
|
afaics |
|
Thanks. I don't understand why this is necessary. https://github.com/apache/httpd/blob/trunk/server/log.c#L52 -> The Which happens on my system (Fedora with autoconf 2.71) , and in the tarballs released at |
|
That can't be it, because your patch also assumes that I think there's something broken with this build environment due to the cross-build. You are not seeing "normal" CPPFLAGS from APR 1.x either, which on Linux should look like: Instead you see only: |
|
I'm still guessing this is a defect of a cross-build environment which should be investigated and fixed properly rather than trying to tweak the headers, closing since no feedback but feel free to update/reopen. |
gettid() needs _GNU_SOURCE defined which is provided by ap_config_auto.h
Fixes buildroot error:
http://autobuild.buildroot.net/results/2f6/2f6b7bbb4c97e4c91b3abd6bb205e237e57045fa//build-end.log
log.c: In function 'log_tid':
log.c:637:21: error: implicit declaration of function 'gettid'; did you mean 'getgid'? [-Wimplicit-function-declaration]
637 | pid_t tid = gettid();