changeset 36266:29b462786834

build: Define _BSD_SOURCE for gethostbyname2 This broke in 1dca91d when a bunch of source #defines were defined unconditionally for all source files. Restore IPv6 support in stream/tcp module by handling it analog to how strsep was handled in 11b73048 . Patch-by: Erik Auerswald >auerswal unix-ag uni-kl de<
author al
date Sun, 14 Jul 2013 18:31:15 +0000
parents cb8ef00df29f
children f51965824a2b
files configure stream/tcp.c
diffstat 2 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Sat Jul 13 21:24:47 2013 +0000
+++ b/configure	Sun Jul 14 18:31:15 2013 +0000
@@ -3598,6 +3598,7 @@
 echocheck "gethostbyname2"
 if test "$_gethostbyname2" = auto ; then
 cat > $TMPC << EOF
+#define _BSD_SOURCE
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netdb.h>
--- a/stream/tcp.c	Sat Jul 13 21:24:47 2013 +0000
+++ b/stream/tcp.c	Sun Jul 14 18:31:15 2013 +0000
@@ -20,6 +20,8 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
+#define _BSD_SOURCE
+
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>