[glib: 3/6] meson: Only look for _NSGetEnviron when building for macOS
- From: Sebastian Dröge <sdroege src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 3/6] meson: Only look for _NSGetEnviron when building for macOS
- Date: Tue, 2 Jun 2020 10:57:10 +0000 (UTC)
commit a28b52d7db5f60e96c7c7f5ff0c42e9661e5e32a
Author: Nirbheek Chauhan <nirbheek centricular com>
Date: Fri May 29 00:31:35 2020 +0530
meson: Only look for _NSGetEnviron when building for macOS
On iOS it can cause build failures with some SDK versions, and its
usage will also cause the app to be rejected on submission.
meson.build | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/meson.build b/meson.build
index 51554ef62..f51daf6b3 100644
--- a/meson.build
+++ b/meson.build
@@ -512,9 +512,14 @@ functions = [
'wcslen',
'wcsnlen',
'sysctlbyname',
- '_NSGetEnviron',
]
+# _NSGetEnviron is available on iOS too, but its usage gets apps rejected from
+# the app store since it's considered 'private API'
+if host_system == 'darwin'
+ functions += ['_NSGetEnviron']
+endif
+
if glib_conf.has('HAVE_SYS_STATVFS_H')
functions += ['statvfs']
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]