configure.ac: check if "struct ucred" is available

By default, glibc 2.8 hides struct ucred behind the _GNU_SOURCE
macro.  I don't want to enable that globally, because it may encourage
the use of non-portable functions.  Test if "struct ucred" is
available, and enable _GNU_SOURCE if required.

For details about that issue, see glib's bug database:

 http://sources.redhat.com/bugzilla/show_bug.cgi?id=6545
This commit is contained in:
Max Kellermann
2008-10-16 14:59:26 +02:00
parent 3b20fa4f3f
commit 9b5ce27c3b
3 changed files with 35 additions and 2 deletions

View File

@@ -308,6 +308,7 @@ fi
if test x$enable_un = xyes; then
AC_DEFINE(HAVE_UN, 1, [Define if unix domain socket support is enabled])
STRUCT_UCRED
fi
enable_osx=no