[PATCH:lbxproxy] Add AC_SYSTEM_EXTENSIONS to expose non-standard extensions

Alan Coopersmith alan.coopersmith at oracle.com
Fri Dec 27 11:54:06 PST 2013


Required on Solaris to expose fd_mask in <sys/select.h> now that
xtrans 1.3 defines _XOPEN_SOURCE to 600 on Solaris, since fd_mask
is not defined in that version of the XPG standards.

Fixes build failure:
os/connection.c: In function ‘CreateServerSockets’:
os/connection.c:335:10: error: ‘fd_mask’ undeclared (first use in this function)
os/connection.c:335:10: note: each undeclared identifier is reported only once for each function it appears in
os/connection.c: In function ‘ListenWellKnownSockets’:
os/connection.c:416:5: error: ‘fd_mask’ undeclared (first use in this function)
os/connection.c: In function ‘EstablishNewConnections’:
os/connection.c:562:5: error: ‘fd_mask’ undeclared (first use in this function)
os/connection.c: In function ‘CloseDownFileDescriptor’:
os/connection.c:684:10: error: ‘fd_mask’ undeclared (first use in this function)
os/connection.c: In function ‘CheckConnections’:
os/connection.c:701:5: error: unknown type name ‘fd_mask’
os/connection.c:711:17: error: ‘fd_mask’ undeclared (first use in this function)
os/connection.c: In function ‘OnlyListenToOneClient’:
os/connection.c:770:2: error: ‘fd_mask’ undeclared (first use in this function)
os/connection.c: In function ‘ListenToAllClients’:
os/connection.c:801:2: error: ‘fd_mask’ 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 f65a752..55ca68d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -33,6 +33,11 @@ AC_CANONICAL_HOST
 AM_INIT_AUTOMAKE([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



More information about the xorg-devel mailing list