added _BSD_SOURCE for linux to solve some lingering compile issues

This commit is contained in:
Glen Wiley 2014-06-02 11:40:58 -04:00
parent ac0b808671
commit 20c6889f9d
3 changed files with 3 additions and 6 deletions

4
configure vendored
View File

@ -3248,9 +3248,7 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
case "$host_os" in case "$host_os" in
linux* ) CFLAGS="$CFLAGS -D_XOPEN_SOURCE=501" # unfortunate, but needed to linux* ) CFLAGS="$CFLAGS -D_BSD_SOURCE"
# pick up strdup() declaration
# in <string.h>
;; ;;
solaris* ) CFLAGS="$CFLAGS -D__EXTENSIONS__" # for strdup() from <string.h> solaris* ) CFLAGS="$CFLAGS -D__EXTENSIONS__" # for strdup() from <string.h>
;; ;;

View File

@ -45,9 +45,7 @@ AC_PROG_CPP
# Checks for programs. # Checks for programs.
AC_CANONICAL_HOST AC_CANONICAL_HOST
case "$host_os" in case "$host_os" in
linux* ) CFLAGS="$CFLAGS -D_XOPEN_SOURCE=501" # unfortunate, but needed to linux* ) CFLAGS="$CFLAGS -D_BSD_SOURCE"
# pick up strdup() declaration
# in <string.h>
;; ;;
solaris* ) CFLAGS="$CFLAGS -D__EXTENSIONS__" # for strdup() from <string.h> solaris* ) CFLAGS="$CFLAGS -D__EXTENSIONS__" # for strdup() from <string.h>
;; ;;

View File

@ -33,6 +33,7 @@
*/ */
#include <stdio.h> #include <stdio.h>
#include <string.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <locale.h> #include <locale.h>
#include <stringprep.h> #include <stringprep.h>