diff --git a/gio/meson.build b/gio/meson.build index 8030f60a5..e0a190cd6 100644 --- a/gio/meson.build +++ b/gio/meson.build @@ -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 @@ -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 diff --git a/meson.build b/meson.build index 05dfff027..e3ab6afaf 100644 --- a/meson.build +++ b/meson.build @@ -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''')