summaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-06-07 00:11:17 +0000
committerRoy Marples <roy@marples.name>2008-06-07 00:11:17 +0000
commit751e2f818d970ca55fc094647df3ab9345ad3166 (patch)
tree6d8125094743259114b8494d36b7e197d637ed27 /common.h
parentfedb3da0be34b47246d663e6ff55a7e0937515c0 (diff)
downloaddhcpcd-751e2f818d970ca55fc094647df3ab9345ad3166.tar.xz
Add a function to test if a fd has data to be read.
Diffstat (limited to 'common.h')
-rw-r--r--common.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/common.h b/common.h
index 9df668a8..817ccaaa 100644
--- a/common.h
+++ b/common.h
@@ -35,6 +35,8 @@
#include <stdio.h>
#include <string.h>
+#define UNCONST(a) ((void *)(unsigned long)(const void *)(a))
+
#if __GNUC__ > 2 || defined(__INTEL_COMPILER)
# define _unused __attribute__((__unused__))
#else
@@ -70,6 +72,7 @@ int closefrom(int);
int close_fds(void);
int close_on_exec(int);
+int fd_hasdata(int);
ssize_t get_line(char **, size_t *, FILE *);
int get_time(struct timeval *);
time_t uptime(void);