diff options
| author | Roy Marples <roy@marples.name> | 2008-05-19 09:16:55 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2008-05-19 09:16:55 +0000 |
| commit | 32391c95110f44cd7dd0245221c21b7e0d7e5d5a (patch) | |
| tree | 64329bbd21d08e82b82cac5ddcf6fce2ebc5e422 /common.h | |
| parent | c30da3c20325f4ddbf797bc5f30e5e422b185b6e (diff) | |
| download | dhcpcd-32391c95110f44cd7dd0245221c21b7e0d7e5d5a.tar.xz | |
Create a real arc4linux function so we don't have to visible seed random in dhcpcd main.
Diffstat (limited to 'common.h')
| -rw-r--r-- | common.h | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -29,9 +29,9 @@ #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 <stdint.h> #include <stdio.h> #include <string.h> @@ -41,8 +41,12 @@ # define _unused #endif -#ifdef __GLIBC__ -#define arc4random (uint32_t)random +#ifndef HAVE_ARC4RANDOM +# ifdef __GLIBC__ +uint32_t arc4random(void); +#else +# define HAVE_ARC4RANDOM +# endif #endif #ifndef HAVE_STRLCPY |
