From: Otto Moerbeek Date: Fri, 7 Jul 2023 10:02:14 +0000 (+0200) Subject: Fix build: put chacha_private.h into _SOURCES X-Git-Tag: rec-5.0.0-alpha1~122^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e03b2c5c9de78a026da6d7040b03e688ea8dc80b;p=thirdparty%2Fpdns.git Fix build: put chacha_private.h into _SOURCES Also fix redundant declaration warnings Followup to #12999 --- diff --git a/ext/arc4random/Makefile.am b/ext/arc4random/Makefile.am index 3a33bbe3c9..e776e0e0ad 100644 --- a/ext/arc4random/Makefile.am +++ b/ext/arc4random/Makefile.am @@ -5,5 +5,6 @@ libarc4random_la_SOURCES = \ arc4random.hh \ arc4random_uniform.c \ bsd-getentropy.c \ + chacha_private.h \ includes.h \ log.h diff --git a/ext/arc4random/arc4random.hh b/ext/arc4random/arc4random.hh index 1af8fee380..f9f779f12e 100644 --- a/ext/arc4random/arc4random.hh +++ b/ext/arc4random/arc4random.hh @@ -5,7 +5,13 @@ extern "C" { +#ifndef HAVE_ARC4RANDOM uint32_t arc4random(void); +#endif +#ifndef HAVE_ARC4RANDOM_BUF void arc4random_buf(void* buf, size_t nbytes); +#endif +#ifndef HAVE_ARC4RANDOM_UNIFORM uint32_t arc4random_uniform(uint32_t upper_bound); +#endif } diff --git a/ext/arc4random/includes.h b/ext/arc4random/includes.h index 81f04a3bef..0a3882e483 100644 --- a/ext/arc4random/includes.h +++ b/ext/arc4random/includes.h @@ -11,8 +11,14 @@ #define seed_from_prngd(a, b) -1 +#ifndef HAVE_ARC4RANDOM uint32_t arc4random(void); +#endif +#ifndef HAVE_ARC4RANDOM_BUF void arc4random_buf(void *buf, size_t nbytes); +#endif +#ifndef HAVE_ARC4RANDOM_UNIFORM uint32_t arc4random_uniform(uint32_t upper_bound); +#endif #define DEF_WEAK(x)