[PATCH:xhost] Add AC_USE_SYSTEM_EXTENSIONS to expose non-standard extensions

Daniel Stone daniel at fooishbar.org
Mon Dec 30 08:27:04 PST 2013


Reviewed-by: Daniel Stone <daniel at fooishbar.org>

On 27 December 2013 20:11, Alan Coopersmith <alan.coopersmith at oracle.com> wrote:
> 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 at oracle.com>
> ---
>  configure.ac |    5 +++++
>  1 file changed, 5 insertions(+)
>
> 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])])
> --
> 1.7.9.2
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel


More information about the xorg-devel mailing list