summaryrefslogtreecommitdiff
path: root/package/rdate
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-03-13 09:11:48 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2014-03-13 09:11:48 +0100
commit607c3fcd1d10a37c077c870df450b5389fb519bf (patch)
tree9c7c0e209d6373efe2296e379c63c29d27a8847b /package/rdate
parentc16eb800d935d903d2ab38b3da8270324284e973 (diff)
parentf42fb988bae9d402b0b204614b54ba9b4261d877 (diff)
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Diffstat (limited to 'package/rdate')
-rw-r--r--package/rdate/Makefile2
-rw-r--r--package/rdate/patches/patch-arc4random_c41
2 files changed, 42 insertions, 1 deletions
diff --git a/package/rdate/Makefile b/package/rdate/Makefile
index 1dd8d0222..a37cbdfbc 100644
--- a/package/rdate/Makefile
+++ b/package/rdate/Makefile
@@ -5,7 +5,7 @@ include ${TOPDIR}/rules.mk
PKG_NAME:= rdate
PKG_VERSION:= 20070817
-PKG_RELEASE:= 3
+PKG_RELEASE:= 4
PKG_MD5SUM:= 9a6489d7de4311678a3fab001bb503df
PKG_DESCR:= A small rdate and NTP client
PKG_SECTION:= ntp
diff --git a/package/rdate/patches/patch-arc4random_c b/package/rdate/patches/patch-arc4random_c
new file mode 100644
index 000000000..e84a77832
--- /dev/null
+++ b/package/rdate/patches/patch-arc4random_c
@@ -0,0 +1,41 @@
+--- rdate.orig/arc4random.c 2007-05-15 00:15:12.000000000 +0200
++++ rdate/arc4random.c 2014-03-03 07:27:38.000000000 +0100
+@@ -30,7 +30,6 @@
+ #include <sys/param.h>
+ #include <sys/types.h>
+ #include <sys/time.h>
+-#include <sys/sysctl.h>
+ #include <fcntl.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+@@ -97,30 +96,6 @@ arc4_stir(struct arc4_stream *as)
+ if (fd != -1) {
+ read(fd, rdat.rnd, sizeof(rdat.rnd));
+ close(fd);
+- } else {
+- /* /dev/urandom failed? Maybe we're in a chroot. */
+-//#if defined(CTL_KERN) && defined(KERN_RANDOM) && defined(RANDOM_UUID)
+-#ifdef _LINUX_SYSCTL_H
+- /* XXX this is for Linux, which uses enums */
+-
+- int mib[3];
+- size_t i, len;
+-
+- mib[0] = CTL_KERN;
+- mib[1] = KERN_RANDOM;
+- mib[2] = RANDOM_UUID;
+-
+- for (i = 0; i < sizeof(rdat.rnd) / sizeof(u_int); i ++) {
+- len = sizeof(u_int);
+- if (sysctl(mib, 3, &rdat.rnd[i], &len, NULL, 0) == -1) {
+- fprintf(stderr, "warning: no entropy source\n");
+- break;
+- }
+- }
+-#else
+- /* XXX kFreeBSD doesn't seem to have KERN_ARND or so */
+- ;
+-#endif
+ }
+
+ arc4_stir_pid = getpid();