]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Make getentropy work on OSX with libunbound.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 11 Jul 2014 11:37:53 +0000 (11:37 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 11 Jul 2014 11:37:53 +0000 (11:37 +0000)
git-svn-id: file:///svn/unbound/trunk@3165 be551aaa-1e26-0410-a405-d3ace91eadb9

compat/getentropy_osx.c

index f1bce33a1ded626be38abdec4caf8f79b6a107c1..45e7754aed768a69a71a9dcffc1356fdf5206189 100644 (file)
@@ -71,7 +71,7 @@
 #define HD(x)   (SHA512_Update(&ctx, (char *)&(x), sizeof (x)))
 int    getentropy(void *buf, size_t len);
 
-extern int main(int, char *argv[]);
+/*extern int main(int, char *argv[]);*/
 static int gotdata(char *buf, size_t len);
 static int getentropy_urandom(void *buf, size_t len);
 static int getentropy_fallback(void *buf, size_t len);
@@ -289,7 +289,7 @@ getentropy_fallback(void *buf, size_t len)
                        HX(sigprocmask(SIG_BLOCK, NULL, &sigset) == -1,
                            sigset);
 
-                       HD(main);               /* an addr in program */
+                       /*HD(main);*/           /* an addr in program */
                        HD(getentropy); /* an addr in this library */
                        HD(printf);             /* an addr in libc */
                        p = (char *)&p;