From 7f3291057bfc499933eddeb980ba67b9fb87834e Mon Sep 17 00:00:00 2001 From: Mariusz Zaborski Date: Sun, 4 Nov 2018 19:30:26 +0100 Subject: [PATCH] Un-break build libexpat. The writeRandomBytes_arc4random is not used if the arc4random_buf is available. This caused compiler to throw warnings. Finally this breaks a build when warnings are treated as errors. --- expat/lib/xmlparse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c index 998b866d..30d55c5c 100644 --- a/expat/lib/xmlparse.c +++ b/expat/lib/xmlparse.c @@ -738,7 +738,7 @@ writeRandomBytes_dev_urandom(void * target, size_t count) { #endif /* ! defined(HAVE_ARC4RANDOM_BUF) && ! defined(HAVE_ARC4RANDOM) */ -#if defined(HAVE_ARC4RANDOM) +#if defined(HAVE_ARC4RANDOM) && ! defined(HAVE_ARC4RANDOM_BUF) static void writeRandomBytes_arc4random(void * target, size_t count) { @@ -756,7 +756,7 @@ writeRandomBytes_arc4random(void * target, size_t count) { } } -#endif /* defined(HAVE_ARC4RANDOM) */ +#endif /* defined(HAVE_ARC4RANDOM) && ! defined(HAVE_ARC4RANDOM_BUF) */ #ifdef _WIN32