From 028d047cebf0cb2089063ee16bc48770ae277c61 Mon Sep 17 00:00:00 2001 From: Bernd Kuhls Date: Mon, 28 Oct 2024 23:21:01 +0100 Subject: [PATCH] package/apache: include ap_config_auto.h to define _GNU_SOURCE Fixes: http://autobuild.buildroot.net/results/2f6/2f6b7bbb4c97e4c91b3abd6bb205e237e57045fa/ and many more. The bug was introduced by bumping apache to 2.4.59 with buildroot commit e0bbfaea0e983c1ce42a9c3085f3ca3dd796852f which includes https://github.com/apache/httpd/commit/008e6afcfdae36bce1b5f3fc0cb9519375fd99cf Signed-off-by: Bernd Kuhls Signed-off-by: Thomas Petazzoni --- ...lude-ap_config_auto.h-to-define-_GNU.patch | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 package/apache/0004-ap_log_error-Include-ap_config_auto.h-to-define-_GNU.patch diff --git a/package/apache/0004-ap_log_error-Include-ap_config_auto.h-to-define-_GNU.patch b/package/apache/0004-ap_log_error-Include-ap_config_auto.h-to-define-_GNU.patch new file mode 100644 index 0000000000..40386147cf --- /dev/null +++ b/package/apache/0004-ap_log_error-Include-ap_config_auto.h-to-define-_GNU.patch @@ -0,0 +1,40 @@ +From f7a85d0d2b76db75dc976e8dfa1101c954ea1a74 Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls +Date: Mon, 28 Oct 2024 23:13:05 +0100 +Subject: [PATCH] ap_log_error: Include ap_config_auto.h to define + _GNU_SOURCE + +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(); + +Upstream: https://github.com/apache/httpd/pull/496 + +Signed-off-by: Bernd Kuhls +--- + server/log.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/server/log.c b/server/log.c +index 91dcf2c3eb..e709288858 100644 +--- a/server/log.c ++++ b/server/log.c +@@ -21,6 +21,10 @@ + * + */ + ++#if !defined(WIN32) && !defined(NETWARE) ++#include "ap_config_auto.h" ++#endif ++ + #include "apr.h" + #include "apr_general.h" /* for signal stuff */ + #include "apr_strings.h" +-- +2.39.5 +