summaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-05-15 16:09:42 +0000
committerRoy Marples <roy@marples.name>2008-05-15 16:09:42 +0000
commit8dc6afb7e808c5e24a69fd035914a1a67432a950 (patch)
treed2474e4bfb72febc51e88e9c42cc68acb7a2d90f /common.h
parentfca9d5445b39e6efa37de6cf86c99229dfab3167 (diff)
downloaddhcpcd-8dc6afb7e808c5e24a69fd035914a1a67432a950.tar.xz
Check correct lengths and use closefrom where available.
Diffstat (limited to 'common.h')
-rw-r--r--common.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/common.h b/common.h
index 8689cf1e..90d84fe9 100644
--- a/common.h
+++ b/common.h
@@ -55,6 +55,12 @@ size_t strlcpy(char *, const char *, size_t);
void srandomdev(void);
#endif
+#define HAVE_CLOSEFROM
+#if defined(__linux__) || defined(__FreeBSD__)
+# undef HAVE_CLOSEFROM
+int closefrom(int);
+#endif
+
int close_fds(void);
int close_on_exec(int);
ssize_t get_line(char **, size_t *, FILE *);