]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Fix build: put chacha_private.h into _SOURCES
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 7 Jul 2023 10:02:14 +0000 (12:02 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 7 Jul 2023 10:06:29 +0000 (12:06 +0200)
Also fix redundant declaration warnings

Followup to #12999

ext/arc4random/Makefile.am
ext/arc4random/arc4random.hh
ext/arc4random/includes.h

index 3a33bbe3c9cf829bbd7248379c03df5db3baa064..e776e0e0addc1302930bd01c695e588034ecccea 100644 (file)
@@ -5,5 +5,6 @@ libarc4random_la_SOURCES = \
        arc4random.hh \
        arc4random_uniform.c \
        bsd-getentropy.c \
+       chacha_private.h \
        includes.h \
        log.h
index 1af8fee3805a28a064b90ab7d43b94a1eefdfd3d..f9f779f12e382632f9ef6adf4f23638a38a0f189 100644 (file)
@@ -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
 }
index 81f04a3befa1bbab2388d2dcc13884dd820f10a9..0a3882e4836a25668f72c576cf280f3284c7c0ef 100644 (file)
 
 #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)