28 lines
1.1 KiB
Diff
28 lines
1.1 KiB
Diff
Don't define deprecated glibc symbol
|
|
|
|
Avoid defining the deprecated symbols _BSD_SOURCE and _SVID_SOURCE
|
|
that xmkmf thinks are needed to compile X programs.
|
|
|
|
diff -r 09d56098ea2c -r 32a8151f8af7 configure.in
|
|
--- a/configure.in Sat Feb 11 01:24:06 2017 +0100
|
|
+++ b/configure.in Sat Feb 11 01:59:40 2017 +0100
|
|
@@ -2868,10 +2868,15 @@
|
|
* ) val=1 ;;
|
|
esac
|
|
dnl Avoid re-AC_DEFINE-ing xmkmf symbols we've already defined above.
|
|
- if grep "^#define $sym " confdefs.h >/dev/null; then :; else
|
|
- if test "$val" = "1"
|
|
- then AC_DEFINE_UNQUOTED($sym)
|
|
- else AC_DEFINE_UNQUOTED($sym,$val)
|
|
+dnl Also, glibc doesn't like two of the traditional POSIX macros that xmkmf
|
|
+dnl likes us to define; ignore them if appropriate.
|
|
+ if grep "^#define $sym " confdefs.h >/dev/null || \
|
|
+ test "$have_glibc" = "yes" -a "$sym" = "_BSD_SOURCE" || \
|
|
+ test "$have_glibc" = "yes" -a "$sym" = "_SVID_SOURCE";
|
|
+ then :; else
|
|
+ if test "$val" = "1"
|
|
+ then AC_DEFINE_UNQUOTED($sym)
|
|
+ else AC_DEFINE_UNQUOTED($sym,$val)
|
|
fi
|
|
fi ;;
|
|
esac
|