diff options
| author | Roy Marples <roy@marples.name> | 2008-05-15 19:21:15 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2008-05-15 19:21:15 +0000 |
| commit | dcf889cb72d2d385db03e3ee29b80fbf035abf69 (patch) | |
| tree | 9218e6b04960855efce69f39b7abe2921de7b014 /common.h | |
| parent | 8673924690579224982640dd29cbbbdfd3721bcd (diff) | |
| download | dhcpcd-dcf889cb72d2d385db03e3ee29b80fbf035abf69.tar.xz | |
Use arc4random as everything apart from glibc seems to have it.
Diffstat (limited to 'common.h')
| -rw-r--r-- | common.h | 13 |
1 files changed, 5 insertions, 8 deletions
@@ -29,6 +29,7 @@ #define COMMON_H /* string.h pulls in features.h so the below define checks work */ +#include <sys/cdefs.h> #include <sys/types.h> #include <sys/time.h> #include <stdio.h> @@ -40,6 +41,10 @@ # define _unused #endif +#ifdef __GLIBC__ +#define arc4random (uint32_t)random +#endif + #ifndef HAVE_STRLCPY # define HAVE_STRLCPY 1 #endif @@ -51,14 +56,6 @@ size_t strlcpy(char *, const char *, size_t); # endif #endif -#ifndef HAVE_SRANDOMDEV -# define HAVE_SRANDOMDEV 1 -#endif -#if defined(__GLIBC__) || defined(__NetBSD__) -# undef HAVE_SRANDOMDEV -void srandomdev(void); -#endif - #ifndef HAVE_CLOSEFROM #define HAVE_CLOSEFROM 1 #endif |
