[glib: 2/3] build: Fix inconsistent Android host system checks
- From: Sebastian Dröge <sdroege src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 2/3] build: Fix inconsistent Android host system checks
- Date: Wed, 6 Jan 2021 08:34:53 +0000 (UTC)
commit ea0c4bf0459a5571c709d2e052b2791ef26be07e
Author: Ole André Vadla Ravnås <oleavr gmail com>
Date: Tue Dec 29 18:47:34 2020 +0100
build: Fix inconsistent Android host system checks
To match the value in the Meson reference table for "Operating system
names", and our checks elsewhere.
gio/meson.build | 4 ++--
meson.build | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
---
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 <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>
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''')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]