summaryrefslogtreecommitdiffstats
path: root/socket.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-02-10 23:30:08 +0000
committerRoy Marples <roy@marples.name>2008-02-10 23:30:08 +0000
commitd78d972e6f34625827ea48e1cd7c37e4304b1f8a (patch)
tree3b09c4b85ef21f11d51a05e6ef9811d972db0191 /socket.c
parent182ac3def5aabd9cfcd16549c0f9caecf94b5c3f (diff)
downloaddhcpcd-d78d972e6f34625827ea48e1cd7c37e4304b1f8a.tar.xz
Fix compile on NetBSD.
Diffstat (limited to 'socket.c')
-rw-r--r--socket.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/socket.c b/socket.c
index 8292705f..a3ceb8d0 100644
--- a/socket.c
+++ b/socket.c
@@ -39,6 +39,7 @@
#include <netinet/udp.h>
#include <arpa/inet.h>
#include <errno.h>
+#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -375,7 +376,7 @@ ssize_t get_packet (const interface_t *iface, unsigned char *data,
*buffer_len = read (iface->fd, bpf.buffer, iface->buffer_length);
*buffer_pos = 0;
if (*buffer_len < 1) {
- struct timespec tv;
+ struct timespec ts;
logger (LOG_ERR, "read: %s", strerror (errno));
ts.tv_sec = 3;
ts.tv_nsec = 0;