[vte] build: Define __BSD_VISIBLE on freebsd



commit c033d7583ec6d565e5a4be902cca1e1c882e07a7
Author: Christian Persch <chpe src gnome org>
Date:   Fri Jun 24 22:11:13 2022 +0200

    build: Define __BSD_VISIBLE on freebsd
    
    https://gitlab.gnome.org/GNOME/vte/-/issues/2564#note_1485997

 meson.build | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
---
diff --git a/meson.build b/meson.build
index 83901580..6a0629c8 100644
--- a/meson.build
+++ b/meson.build
@@ -218,9 +218,19 @@ libc_feature_defines = [
   ['_GNU_SOURCE', '1'],
   ['_POSIX_C_SOURCE', '200809L'],
   ['_XOPEN_SOURCE', '700'],
-  ['_XOPEN_SOURCE_EXTENDED', 1],
+  ['_XOPEN_SOURCE_EXTENDED', '1'],
 ]
 
+if host_machine.system() == 'freebsd'
+  # Defining _POSIX_C_SOURCE above makes freebsd not expose some functionality
+  # that's hidden behind __BSD_VISIBLE.  Since there appears to be no other way
+  # to make everything visible, just forcibly define __BSD_VISIBLE.
+
+  libc_feature_defines += [
+    ['__BSD_VISIBLE', '1'],
+  ]
+endif
+
 foreach f: libc_feature_defines
   config_h.set(f[0], f[1])
 endforeach


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