Commit fccc49a8 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Fix read_random_bytes yet again.

Sigh.
parent 76bdfef3
...@@ -84,11 +84,10 @@ gettime(struct timeval *tv) ...@@ -84,11 +84,10 @@ gettime(struct timeval *tv)
/* If /dev/urandom doesn't exist, this will fail with ENOENT, which the /* If /dev/urandom doesn't exist, this will fail with ENOENT, which the
caller will deal with gracefully. */ caller will deal with gracefully. */
ssize_t int
read_random_bytes(void *buf, size_t len) read_random_bytes(void *buf, int len)
{ {
int fd; int fd, rc;
size_t rc;
fd = open("/dev/urandom", O_RDONLY); fd = open("/dev/urandom", O_RDONLY);
if(fd < 0) { if(fd < 0) {
......
...@@ -77,6 +77,6 @@ int kernel_addresses(char *ifname, int ifindex, int ll, ...@@ -77,6 +77,6 @@ int kernel_addresses(char *ifname, int ifindex, int ll,
struct kernel_route *routes, int maxroutes); struct kernel_route *routes, int maxroutes);
int if_eui64(char *ifname, int ifindex, unsigned char *eui); int if_eui64(char *ifname, int ifindex, unsigned char *eui);
int gettime(struct timeval *tv); int gettime(struct timeval *tv);
ssize_t read_random_bytes(void *buf, size_t len); int read_random_bytes(void *buf, int len);
int kernel_older_than(const char *sysname, int version, int sub_version); int kernel_older_than(const char *sysname, int version, int sub_version);
int kernel_has_ipv6_subtrees(void); int kernel_has_ipv6_subtrees(void);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment