[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#826061: nginx: FTBFS on kfreebsd: incomplete type 'struct in6_pktinfo'

tags 826061 + patch
user debian-bsd@lists.debian.org
usertags 826061 + kfreebsd


Andreas Beckmann wrote:
> src/event/ngx_event_accept.c:65:17: warning: implicit declaration of function 'accept4' [-Wimplicit-function-declaration]
> src/event/ngx_event_accept.c:348:55: error: invalid application of 'sizeof' to incomplete type 'struct in6_pktinfo'
> src/event/ngx_event_accept.c:546:43: error: dereferencing pointer to incomplete type 'struct in6_pktinfo'

Please find a simple patch for this attached.  Thanks!

Steven Chamberlain
Date: Sat, 16 Jul 2016 23:52:50 +0100
From: Steven Chamberlain <stevenc@debian.org>
Subject: Use _GNU_SOURCE on GNU/kFreeBSD

Define _GNU_SOURCE not only on GNU/Hurd, but also other glibc-based
platforms including GNU/kFreeBSD.

diff --git a/src/os/unix/ngx_posix_config.h b/src/os/unix/ngx_posix_config.h
index 5d1358e..69b8dd1 100644
--- a/src/os/unix/ngx_posix_config.h
+++ b/src/os/unix/ngx_posix_config.h
@@ -21,10 +21,13 @@
+#if defined(__GLIBC__)
 #ifndef _GNU_SOURCE
 #define _GNU_SOURCE             /* accept4() */
 #define _FILE_OFFSET_BITS       64

Attachment: signature.asc
Description: Digital signature

Reply to: