[PATCH:xauth] Add AC_SYSTEM_EXTENSIONS to expose non-standard extensions
Alan Coopersmith
alan.coopersmith at oracle.com
Fri Dec 27 11:24:22 PST 2013
Required on Solaris to expose definitions in system headers that
are not defined in the XPG standards now that xtrans 1.3 defines
_XOPEN_SOURCE to 600 on Solaris.
Fixes build failures:
gethost.c: In function ‘get_hostname’:
gethost.c:97:21: error: ‘INET6_ADDRSTRLEN’ undeclared (first use in this function)
gethost.c:97:21: note: each undeclared identifier is reported only once for each function it appears in
gethost.c:97:16: warning: unused variable ‘addr’ [-Wunused-variable]
gethost.c: In function ‘get_address_info’:
gethost.c:196:9: error: implicit declaration of function ‘strlcpy’ [-Werror=implicit-function-declaration]
gethost.c:196:9: warning: nested extern declaration of ‘strlcpy’ [-Wnested-externs]
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
configure.ac | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/configure.ac b/configure.ac
index 3b135a9..51f363e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -30,6 +30,11 @@ AM_MAINTAINER_MODE
AC_CONFIG_HEADERS([config.h])
+# Set common system defines for POSIX extensions, such as _GNU_SOURCE
+# Must be called before any macros that run the compiler (like
+# AC_PROG_LIBTOOL) to avoid autoconf errors.
+AC_USE_SYSTEM_EXTENSIONS
+
# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
m4_ifndef([XORG_MACROS_VERSION],
[m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
--
1.7.9.2
More information about the xorg-devel
mailing list