The libc implementation on OS/2 declares some standard C99 math functions under
GNU #ifdefs in math.h.  The math function detection in configure thus produces
warnings about implicit function declarations, but manages to link successfully.

Later on, appropriate gcc flags are set to treat implicit function declarations
as errors, causing the build to fail when those math functions are referenced.

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