diff --git a/deps-packaging/apache/debian/rules b/deps-packaging/apache/debian/rules index 0f8cf53e1..e9c05cd9f 100755 --- a/deps-packaging/apache/debian/rules +++ b/deps-packaging/apache/debian/rules @@ -14,6 +14,10 @@ build-stamp: dh_testdir patch -p0 < $(CURDIR)/apachectl.patch + + # Fixed implicit declaration of GNU extension gettid() (See ENT-13084) + patch -p1 < $(CURDIR)/fixed-implicit-decl-gettid.patch + ./configure \ --prefix=$(PREFIX)/httpd \ --enable-so \ diff --git a/deps-packaging/apache/fixed-implicit-decl-gettid.patch b/deps-packaging/apache/fixed-implicit-decl-gettid.patch new file mode 100644 index 000000000..d83535339 --- /dev/null +++ b/deps-packaging/apache/fixed-implicit-decl-gettid.patch @@ -0,0 +1,19 @@ +diff -ruN httpd-2.4.63/server/log.c httpd-2.4.63-modified/server/log.c +--- httpd-2.4.63/server/log.c 2024-06-21 16:31:54.000000000 +0200 ++++ httpd-2.4.63-modified/server/log.c 2025-06-26 15:58:03.168415807 +0200 +@@ -633,11 +633,11 @@ + #endif + #if defined(HAVE_GETTID) || defined(HAVE_SYS_GETTID) + if (arg && *arg == 'g') { +-#ifdef HAVE_GETTID +- pid_t tid = gettid(); +-#else ++// #ifdef HAVE_GETTID ++// pid_t tid = gettid(); ++// #else + pid_t tid = syscall(SYS_gettid); +-#endif ++// #endif + if (tid == -1) + return 0; + return apr_snprintf(buf, buflen, "%"APR_PID_T_FMT, tid); diff --git a/deps-packaging/apache/fixed-implicit-delc-gettid.patch b/deps-packaging/apache/fixed-implicit-delc-gettid.patch new file mode 100644 index 000000000..8655cade9 --- /dev/null +++ b/deps-packaging/apache/fixed-implicit-delc-gettid.patch @@ -0,0 +1,11 @@ +diff -ruN httpd-2.4.63/server/log.c httpd-2.4.63-modified/server/log.c +--- httpd-2.4.63/server/log.c 2024-06-21 16:31:54.000000000 +0200 ++++ httpd-2.4.63-modified/server/log.c 2025-06-26 12:24:42.652916219 +0200 +@@ -39,6 +39,7 @@ + #include + #endif + #if APR_HAVE_UNISTD_H ++#define _GNU_SOURCE // gettid() used below is a GNU extension + #include + #endif + #if APR_HAVE_PROCESS_H