0004-ap_log_error-Include-ap_config_auto.h-to-define-_GNU.patch 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. From f7a85d0d2b76db75dc976e8dfa1101c954ea1a74 Mon Sep 17 00:00:00 2001
  2. From: Bernd Kuhls <bernd@kuhls.net>
  3. Date: Mon, 28 Oct 2024 23:13:05 +0100
  4. Subject: [PATCH] ap_log_error: Include ap_config_auto.h to define
  5. _GNU_SOURCE
  6. gettid() needs _GNU_SOURCE defined which is provided by ap_config_auto.h
  7. Fixes buildroot error:
  8. http://autobuild.buildroot.net/results/2f6/2f6b7bbb4c97e4c91b3abd6bb205e237e57045fa//build-end.log
  9. log.c: In function 'log_tid':
  10. log.c:637:21: error: implicit declaration of function 'gettid'; did you mean 'getgid'? [-Wimplicit-function-declaration]
  11. 637 | pid_t tid = gettid();
  12. Upstream: https://github.com/apache/httpd/pull/496
  13. Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
  14. ---
  15. server/log.c | 4 ++++
  16. 1 file changed, 4 insertions(+)
  17. diff --git a/server/log.c b/server/log.c
  18. index 91dcf2c3eb..e709288858 100644
  19. --- a/server/log.c
  20. +++ b/server/log.c
  21. @@ -21,6 +21,10 @@
  22. *
  23. */
  24. +#if !defined(WIN32) && !defined(NETWARE)
  25. +#include "ap_config_auto.h"
  26. +#endif
  27. +
  28. #include "apr.h"
  29. #include "apr_general.h" /* for signal stuff */
  30. #include "apr_strings.h"
  31. --
  32. 2.39.5