[torquedev] Release Candidate for TORQUE 2.5.8

Alan Wild alan at madllama.net
Sat Oct 1 23:06:23 MDT 2011

I'm glad to see the _GNU_SOURCE patch was included in TORQUE 2.5.8, however,
there is still a descrepency in behavior pertaining to --enable-unixsockets
when compiling against different versions of glibc.

Starting with glibc 2.8, the ucred struct (declared in
/usr/include/bits/socket.h is wrapped in a #ifdef __USE_GNUC block.

The patch as it appears in 2.5.8 does fix this issue when one explicitly
adds --enable-unixsockets to the configure command line.  However, the
configure script (as written) actually attempts to default to enabling unix
sockets, but the since the check itself does not include a _GNU_SOURCE
macro... the check fails....

So for older version of glibc --enable-unixsockets was the default, but on
newer versions the default is --disable-unixsockets.  Explictly specifying
the behavior on the command line does get you what you want, but if you were
relyin the default behavior (as we were) you might be surprised after a
glibc upgrade.

I've generated a trivial patch to configure.ac that restores the default
behavior that was seen with the older version of glibc:

--- configure.ac.old    2011-08-29 15:48:00.000000000 -0500
+++ configure.ac        2011-10-01 21:18:52.525619756 -0500
@@ -1069,6 +1069,7 @@
   #include <sys/ucred.h>
+  #define _GNU_SOURCE 1
   #include <sys/socket.h>
   #ifdef HAVE_SYS_UN_H
All this does is ensure that the same _GNU_SOURCE flag is set when configure
is testing for socket.h


alan at madllama.net http://humbleville.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.supercluster.org/pipermail/torquedev/attachments/20111002/9d0e6523/attachment.html 

More information about the torquedev mailing list