summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2021-07-28 20:20:11 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-07-28 20:20:11 +0000
commit833853ca69292d9ac6f07bb57765be6361e3c795 (patch)
treeed2852fe419ff3610157db7cd98b5f21141b3acb
parentc8bd2a8f29a89bc599af4dc483f80fcf17879423 (diff)
parent0f86a6273ca15fb6b5e30d8dd4d9bd831cb5acbd (diff)
downloadexpat-833853ca69292d9ac6f07bb57765be6361e3c795.tar.gz
Merge "Add support for building libexpat against musl" am: 667f64dc71 am: d6bc194f45 am: a9e0aeff34 am: 0f86a6273c
Original change: https://android-review.googlesource.com/c/platform/external/expat/+/1776888 Change-Id: I2844586dc56b4ea460ffd25dc8c04c9680382de2
-rw-r--r--Android.bp4
-rw-r--r--expat_config.h4
2 files changed, 5 insertions, 3 deletions
diff --git a/Android.bp b/Android.bp
index a7fd6b0c..4590de7d 100644
--- a/Android.bp
+++ b/Android.bp
@@ -70,7 +70,9 @@ cc_library {
darwin: {
cflags: ["-fno-common"],
},
-
+ musl: {
+ cflags: ["-DMUSL"],
+ },
windows: {
enabled: true,
},
diff --git a/expat_config.h b/expat_config.h
index 7253eb57..69b01c83 100644
--- a/expat_config.h
+++ b/expat_config.h
@@ -27,7 +27,7 @@
#define HAVE_GETPAGESIZE 1
/* Define to 1 if you have the `getrandom' function. */
-#if defined(__BIONIC__)
+#if defined(__BIONIC__) || defined(MUSL)
#define HAVE_GETRANDOM 1
#endif
@@ -56,7 +56,7 @@
#define HAVE_STRING_H 1
/* Define to 1 if you have `syscall' and `SYS_getrandom'. */
-#if defined(__BIONIC__)
+#if defined(__BIONIC__) || defined(MUSL)
#define HAVE_SYSCALL_GETRANDOM 1
#endif