#2366 closed defect (duplicate)

build on other glibc-based platforms e.g. GNU/kFreeBSD

Reported by: jan.mojzis@… Owned by:
Priority: minor Milestone:
Component: nginx-core Version: 1.22.x
Keywords: Cc: jan.mojzis@…
uname -a:
nginx -V: nginx version: nginx/1.22.0

Description

Hello,
can You please include simple patch which defines _GNU_SOURCE
not only on GNU/Hurd, but also other glibc-based
platforms including GNU/kFreeBSD.
It fixes build on these platforms.

Patch here:

--- nginx.orig/src/os/unix/ngx_posix_config.h
+++ nginx/src/os/unix/ngx_posix_config.h
@@ -21,10 +21,13 @@
 #endif


-#if (NGX_GNU_HURD)
+#if defined(NGX_GNU_HURD) || defined(__GLIBC__)
 #ifndef _GNU_SOURCE
 #define _GNU_SOURCE             /* accept4() */
 #endif
+#endif
+
+#if (NGX_GNU_HURD)
 #define _FILE_OFFSET_BITS       64
 #endif

Change History (2)

comment:1 by Maxim Dounin, 22 months ago

Could you please provide some details about build issues you are seeing without the patch? When I last tested, there were no problems with building nginx on Debian/kFreeBSD (see #1028).

comment:2 by Maxim Dounin, 21 months ago

Resolution: duplicate
Status: newclosed

Feedback timeout. Closing this as a duplicate of #1028.

Note: See TracTickets for help on using tickets.