summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2021-07-28 19:17:27 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2021-07-28 19:17:27 +0000
commit667f64dc71313399b79837222985a92ade9c1c2a (patch)
treeed2852fe419ff3610157db7cd98b5f21141b3acb
parent1b8ae6d364976f4421af3f1063fb8ac59cb74abe (diff)
parent91e0f0d1e21c7fe9bf7c9186357a61b688bba440 (diff)
downloadexpat-667f64dc71313399b79837222985a92ade9c1c2a.tar.gz
Merge "Add support for building libexpat against musl"
-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