summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in11
1 files changed, 10 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index 5ad4aba..470f133 100644
--- a/configure.in
+++ b/configure.in
@@ -415,7 +415,7 @@ AC_HEADER_TIME
dnl Unix
AC_CHECK_HEADERS(sys/resource.h sys/time.h unistd.h sys/ioctl.h sys/stat.h)
AC_CHECK_HEADERS(sys/socket.h sys/types.h)
-AC_CHECK_HEADERS(stddef.h setjmp.h)
+AC_CHECK_HEADERS(stddef.h setjmp.h features.h)
AC_CHECK_HEADERS(stdint.h, C9x=yes)
dnl Windows
AC_CHECK_HEADERS(io.h winsock.h sys/timeb.h)
@@ -453,6 +453,15 @@ case "$host_cpu-$host_vendor-$host_os" in
fi
done
fi)
+ dnl Add POSIX support on Linux systems, so <features.h> defines
+ dnl __USE_POSIX, which is required to get the prototype for fdopen
+ dnl defined correctly in <stdio.h>
+ CPPFLAGS="-D_POSIX_SOURCE $CPPFLAGS"
+ dnl Also add BSD support on Linux systems, so <features.h> defines
+ dnl __USE_BSD, which is required to get the prototype for strdup
+ dnl defined correctly in <string.h> and snprintf & vsnprintf defined
+ dnl correctly in <stdio.h>
+ CPPFLAGS="-D_BSD_SOURCE $CPPFLAGS"
;;
esac