[rhythmbox] build: check harder for fwrite_unlocked



commit 98c12847484d3d942dd77a8f0711c1f7ece6e108
Author: Jonathan Matthew <jonathan d14n org>
Date:   Wed Feb 2 21:45:01 2022 +1000

    build: check harder for fwrite_unlocked
    
    In some environments, fwrite_unlocked doesn't exist as a symbol in a
    header file, but is provided by the compiler (in some sense).  Checking
    that it exists in stdio.h as well ensures we only try to use it if it's
    actually there.

 meson.build | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/meson.build b/meson.build
index db5bb260c..653869417 100644
--- a/meson.build
+++ b/meson.build
@@ -136,7 +136,10 @@ if get_option('brasero').allowed()
   endif
 endif
 
-have_gnu_fwrite_unlocked = cc.has_function('fwrite_unlocked')
+have_gnu_fwrite_unlocked = false
+if cc.has_function('fwrite_unlocked')
+  have_gnu_fwrite_unlocked = cc.has_header_symbol('stdio.h', 'fwrite_unlocked')
+endif
 cdata.set('HAVE_GNU_FWRITE_UNLOCKED', have_gnu_fwrite_unlocked)
 
 # rhythmbox-client interactive mode uses this non-standard function


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]