On some (BSD) systems _POSIX_C_SOURCE masks function definitions in
system header files. Avoid the #define in that case.
This allows eliminating some BSD-specific hacks.
---
configure | 4 +++-
doc/general.texi | 8 --------
2 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/configure b/configure
index 2b5aeab..51ec963 100755
--- a/configure
+++ b/configure
@@ -2310,7 +2310,9 @@ if test "$?" != 0; then
die "C compiler test failed."
fi
-add_cppflags -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112
+add_cppflags -D_ISOC99_SOURCE
+check_func_headers unistd.h swab -D_POSIX_C_SOURCE=200112 &&
+ add_cppflags -D_POSIX_C_SOURCE=200112
check_cflags -std=c99
check_cc -D_FILE_OFFSET_BITS=64 <<EOF && add_cppflags -D_FILE_OFFSET_BITS=64
#include <stdlib.h>
diff --git a/doc/general.texi b/doc/general.texi
index 598b9bc..bbc8e56 100644
--- a/doc/general.texi
+++ b/doc/general.texi
@@ -784,14 +784,6 @@ to configure.
BSD make will not build Libav, you need to install and use GNU Make
(@file{gmake}).
-@subsubsection FreeBSD, DragonFly BSD
-
-These systems will not compile out-of-the-box due to broken system headers.
-Passing @code{--extra-cflags=-D__BSD_VISIBLE} to configure will work
-around the problem. This may have unexpected sideeffects, so use it at
-your own risk. If you care about FreeBSD, please make an attempt at
-getting the system headers fixed.
-
@subsection (Open)Solaris
GNU Make is required to build Libav, so you have to invoke (@file{gmake}),
--
1.7.1
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel