From: Andre Noll Date: Sat, 28 Feb 2009 21:39:50 +0000 (+0100) Subject: Define _GNU_SOURCE to get the ucred structure. X-Git-Tag: v0.3.4~57^2~13 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=95abd05e31f10d86d82ae7c3de9d804db9478def;hp=c6873084d11a7214c75a44692d53f0562e76b4b2 Define _GNU_SOURCE to get the ucred structure. This is needed for glibc >= 2.8. --- diff --git a/configure.ac b/configure.ac index dca49203..f783db78 100644 --- a/configure.ac +++ b/configure.ac @@ -223,6 +223,7 @@ AC_SEARCH_LIBS([inet_ntoa],[nsl],[],[ ########################################################################### ucred AC_MSG_CHECKING(for struct ucred) AC_TRY_LINK([ + #define _GNU_SOURCE #include #include ],[ diff --git a/net.c b/net.c index 2a3fc72b..88b3e3cc 100644 --- a/net.c +++ b/net.c @@ -6,6 +6,12 @@ /** \file net.c Networking-related helper functions. */ +/* + * Since glibc 2.8, the _GNU_SOURCE feature test macro must be defined in order + * to obtain the definition of the ucred structure. + */ +#define _GNU_SOURCE + #include /* At least NetBSD needs these. */