summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2021-07-28 19:47:58 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-07-28 19:47:58 +0000
commita9e0aeff340ff66322707620d470fdaea25630dc (patch)
treeed2852fe419ff3610157db7cd98b5f21141b3acb
parent15be57516e7b4e1751804b4e2d23f71fc781767a (diff)
parentd6bc194f4598e769e2dda1f4a85691217702f94d (diff)
downloadexpat-a9e0aeff340ff66322707620d470fdaea25630dc.tar.gz
Merge "Add support for building libexpat against musl" am: 667f64dc71 am: d6bc194f45
Original change: https://android-review.googlesource.com/c/platform/external/expat/+/1776888 Change-Id: I20091b9233ac2885860d8cefc996a437a79b3952
-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