build: Fix inconsistent Android host system checks

To match the value in the Meson reference table for "Operating system
names", and our checks elsewhere.
This commit is contained in:
Ole André Vadla Ravnås 2020-12-29 18:47:34 +01:00
parent 7b7f987a36
commit ea0c4bf045
2 changed files with 3 additions and 3 deletions

View File

@ -12,7 +12,7 @@ gnetworking_h_conf = configuration_data()
gnetworking_h_nameser_compat_include = ''
if host_system != 'windows' and not host_system.contains('android')
if host_system not in ['windows', 'android']
# Don't check for C_IN on Android since it does not define it in public
# headers, we define it ourselves wherever necessary
if not cc.compiles('''#include <sys/types.h>
@ -148,7 +148,7 @@ if host_system != 'windows'
endif
if host_system.contains('android')
if host_system == 'android'
# struct ip_mreq_source definition is broken on Android NDK <= r16
# See https://bugzilla.gnome.org/show_bug.cgi?id=740791
if not cc.compiles('''#include <netinet/in.h>

View File

@ -608,7 +608,7 @@ endif
# When building for Android-20 and earlier, require Meson 0.54.2 or newer.
# This is needed, because Meson build versions prior to 0.54.2 return false
# positive for stpcpy has_function check when building for legacy Android.
if host_system.startswith('android-')
if host_system == 'android'
android_is_older = cc.compiles('''#if __ANDROID_API__ >= 21
#error Android is 21 or newer
#endif''')