This is needed for glibc >= 2.8.
########################################################################### ucred
AC_MSG_CHECKING(for struct ucred)
AC_TRY_LINK([
+ #define _GNU_SOURCE
#include <sys/types.h>
#include <sys/socket.h>
],[
/** \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 <netdb.h>
/* At least NetBSD needs these. */