summaryrefslogtreecommitdiff
path: root/patches/config.diff
blob: d9a9eaa062af7945de4717e19944f56034f5cc9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Index: expat/expat_config.h
===================================================================
--- expat.orig/expat_config.h
+++ expat/expat_config.h
@@ -8,10 +8,14 @@
 #define BYTEORDER 1234
 
 /* Define to 1 if you have the `arc4random' function. */
-/* #undef HAVE_ARC4RANDOM */
+#if defined(__APPLE__) || defined(__BIONIC__)
+#define HAVE_ARC4RANDOM 1
+#endif
 
 /* Define to 1 if you have the `arc4random_buf' function. */
-/* #undef HAVE_ARC4RANDOM_BUF */
+#if defined(__APPLE__) || defined(__BIONIC__)
+#define HAVE_ARC4RANDOM_BUF 1
+#endif
 
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #define HAVE_DLFCN_H 1
@@ -23,7 +27,9 @@
 #define HAVE_GETPAGESIZE 1
 
 /* Define to 1 if you have the `getrandom' function. */
+#if defined(__BIONIC__) || defined(ANDROID_HOST_MUSL)
 #define HAVE_GETRANDOM 1
+#endif
 
 /* Define to 1 if you have the <inttypes.h> header file. */
 #define HAVE_INTTYPES_H 1
@@ -56,7 +56,9 @@
 #define HAVE_STRING_H 1
 
 /* Define to 1 if you have `syscall' and `SYS_getrandom'. */
+#if 0 /* We only get here for glibc and Windows (where the better choices aren't available) and they don't have this fallback either. */
 #define HAVE_SYSCALL_GETRANDOM 1
+#endif
 
 /* Define to 1 if you have the <sys/param.h> header file. */
 #define HAVE_SYS_PARAM_H 1
@@ -115,7 +121,9 @@
 #define XML_CONTEXT_BYTES 1024
 
 /* Define to include code reading entropy from `/dev/urandom'. */
+#if defined(__GLIBC__)
 #define XML_DEV_URANDOM 1
+#endif
 
 /* Define to make parameter entity parsing functionality available. */
 #define XML_DTD 1