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.
This commit is contained in:
Nirbheek Chauhan 2020-05-29 00:31:35 +05:30
parent 3c78d0cec6
commit a28b52d7db

View File

@ -512,9 +512,14 @@ functions = [
'wcslen', 'wcslen',
'wcsnlen', 'wcsnlen',
'sysctlbyname', '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') if glib_conf.has('HAVE_SYS_STATVFS_H')
functions += ['statvfs'] functions += ['statvfs']
else else