The libc implementation on OS/2 declares some standard C99 math functions under
GNU #ifdefs in math.h.  This fools the math function detection in configure and
those functions are marked as unavailable, which makes the local replacements
in libm.h visible.  Unfortunately their declarations clash with gcc internal
declarations of these functions, resulting in warnings or errors, depending on
compiler settings.

Since setting _GNU_SOURCE on a fringe system will not open the floodgates to
gnuisms polluting the codebase, adding that flag globally for OS/2 allows
compilation to go through on OS/2 without negative sideeffects to speak of.
---
 configure |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/configure b/configure
index c628ff6..d3e8764 100755
--- a/configure
+++ b/configure
@@ -2477,6 +2477,7 @@ case $target_os in
     os/2*)
         ln_s="cp -f"
         objformat="aout"
+        add_cppflags -D_GNU_SOURCE
         add_ldflags -Zomf -Zbin-files -Zargs-wild -Zmap
         SHFLAGS='$(SUBDIR)$(NAME).def -Zdll -Zomf'
         FFSERVERLDFLAGS=""
-- 
1.7.1

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to