aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authornaddy <naddy@FreeBSD.org>2010-05-17 04:05:01 +0800
committernaddy <naddy@FreeBSD.org>2010-05-17 04:05:01 +0800
commit23b735f7eaa3465a5bd87e52a19ff7d1ca88531f (patch)
treeec9fdf9cafc0b57848d6d19a3ba17ea7b7210d82 /net
parent3b3d3fe9712f3fa10c14882afbed92918fe8464e (diff)
downloadfreebsd-ports-gnome-23b735f7eaa3465a5bd87e52a19ff7d1ca88531f.tar.gz
freebsd-ports-gnome-23b735f7eaa3465a5bd87e52a19ff7d1ca88531f.tar.zst
freebsd-ports-gnome-23b735f7eaa3465a5bd87e52a19ff7d1ca88531f.zip
Don't build arc4random_uniform() if provided by libc.
Reported by: no@spam@mgedv.net
Diffstat (limited to 'net')
-rw-r--r--net/openntpd/files/arc4random.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/openntpd/files/arc4random.c b/net/openntpd/files/arc4random.c
index f28b0ba11e7b..f90d70e5bfde 100644
--- a/net/openntpd/files/arc4random.c
+++ b/net/openntpd/files/arc4random.c
@@ -16,6 +16,10 @@
* $FreeBSD$
*/
+#include <sys/param.h>
+
+#if __FreeBSD_version < 800041
+
#include <sys/types.h>
#include <limits.h>
#include <stdlib.h>
@@ -66,3 +70,5 @@ arc4random_uniform(u_int32_t upper_bound)
return r % upper_bound;
}
+
+#endif /* __FreeBSD_version */