Added _POSIX_SOURCE in autoconf so that compiling libtcp-portmon.c works
authorNikolas Garofil <ngarofil@users.sourceforge.net>
Mon, 30 Jun 2008 22:52:19 +0000 (22:52 +0000)
committerNikolas Garofil <ngarofil@users.sourceforge.net>
Mon, 30 Jun 2008 22:52:19 +0000 (22:52 +0000)
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1201 7f574dfc-610e-0410-a909-a81674777703

configure.ac.in

index eaff8e6..05b35ba 100644 (file)
@@ -321,6 +321,7 @@ if test x"$want_portmon" = xyes; then
               AC_MSG_ERROR([missing a needed network header for port monitoring])
         fi
        WANT_GLIB=yes
+       WANT_POSIX_SOURCE=yes
        AC_DEFINE(TCP_PORT_MONITOR, 1, [Define if you want tcp port monitoring support])
   fi
 fi
@@ -455,6 +456,14 @@ if test x$WANT_GLIB = xyes; then
 fi
 
 dnl
+dnl _POSIX_SOURCE
+dnl
+
+if test x$WANT_POSIX_SOURCE = xyes; then
+        CFLAGS="$CFLAGS -D _POSIX_SOURCE"
+fi
+
+dnl
 dnl KVM
 dnl