diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-12-27 11:01:35 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-12-30 08:54:04 -0800 |
commit | f224c62b89e484ef2fff8499d329e9aeae1c3529 (patch) | |
tree | 57fa7a6064796fcf7b679ed7b77a793740afd7a9 | |
parent | 984cfd0c90870310e09d55784c3aaa723f59f527 (diff) |
Add AC_USE_SYSTEM_EXTENSIONS to expose non-standard extensions
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:
In file included from /usr/include/rpc/rpcb_clnt.h:34:0,
from /usr/include/rpc/rpc.h:49,
from xhost.c:98:
/usr/include/rpc/rpcb_prot.h:159:3: error: unknown type name ‘u_int’
/usr/include/rpc/rpcb_prot.h:195:3: error: unknown type name ‘u_int’
/usr/include/rpc/rpcb_prot.h:223:2: error: unknown type name ‘u_int’
/usr/include/rpc/rpcb_prot.h:476:1: error: unknown type name ‘u_int’
/usr/include/rpc/rpcb_prot.h:489:1: error: unknown type name ‘u_int’
xhost.c: In function ‘change_host’:
xhost.c:554:11: error: ‘INET6_ADDRSTRLEN’ undeclared (first use in this function)
xhost.c:554:11: note: each undeclared identifier is reported only once for each function it appears in
xhost.c: In function ‘get_hostname’:
xhost.c:665:23: error: ‘NI_MAXHOST’ undeclared (first use in this function)
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
-rw-r--r-- | configure.ac | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 0d6f506..4ec4de0 100644 --- a/configure.ac +++ b/configure.ac @@ -11,6 +11,11 @@ AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE([foreign dist-bzip2]) AM_MAINTAINER_MODE +# Set common system defines for POSIX extensions, such as _GNU_SOURCE +# Must be called before any macros that run the compiler (like +# XORG_DEFAULT_OPTIONS) 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])]) |