summaryrefslogtreecommitdiffstats
path: root/common.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-05-15 19:21:15 +0000
committerRoy Marples <roy@marples.name>2008-05-15 19:21:15 +0000
commitdcf889cb72d2d385db03e3ee29b80fbf035abf69 (patch)
tree9218e6b04960855efce69f39b7abe2921de7b014 /common.c
parent8673924690579224982640dd29cbbbdfd3721bcd (diff)
downloaddhcpcd-dcf889cb72d2d385db03e3ee29b80fbf035abf69.tar.xz
Use arc4random as everything apart from glibc seems to have it.
Diffstat (limited to 'common.c')
-rw-r--r--common.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/common.c b/common.c
index 84429449..e207258e 100644
--- a/common.c
+++ b/common.c
@@ -36,7 +36,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <time.h>
#include <unistd.h>
#include "common.h"
@@ -75,25 +74,6 @@ get_line(char **line, size_t *len, FILE *fp)
return last;
}
-/* OK, this should be in dhcpcd.c
- * It's here to make dhcpcd more readable */
-#if HAVE_SRANDOMDEV
-#else
-void srandomdev(void)
-{
- int fd;
- unsigned long seed;
-
- fd = open("/dev/urandom", 0);
- if (fd == -1 || read(fd, &seed, sizeof(seed)) == -1)
- seed = time(0);
- if (fd >= 0)
- close(fd);
-
- srandom(seed);
-}
-#endif
-
/* strlcpy is nice, shame glibc does not define it */
#if HAVE_STRLCPY
#else