summaryrefslogtreecommitdiffstats
path: root/common.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-07-24 15:09:33 +0000
committerRoy Marples <roy@marples.name>2008-07-24 15:09:33 +0000
commit318fbafe9e81b35ec47014418c05360448046e0b (patch)
tree5398a6401c8c4300584a15265adaed7669a22208 /common.c
parent5fa0b31f1008b99c38637cbcccf8233b76e78b9b (diff)
downloaddhcpcd-318fbafe9e81b35ec47014418c05360448046e0b.tar.xz
Normalise tv_usecs. Also, send the fd ready back to the main loop so we don't have to re-poll each fd. Saves bytes and is more efficient.
Diffstat (limited to 'common.c')
-rw-r--r--common.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/common.c b/common.c
index 71095ebe..198ce5b4 100644
--- a/common.c
+++ b/common.c
@@ -33,7 +33,6 @@
#ifdef BSD
# include <paths.h>
#endif
-#include <poll.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
@@ -151,25 +150,6 @@ close_fds(void)
}
int
-fd_hasdata(int fd)
-{
- struct pollfd fds;
- int retval;
-
- if (fd == -1)
- return -1;
- fds.fd = fd;
- fds.events = POLLIN;
- fds.revents = 0;
- retval = poll(&fds, 1, 0);
- if (retval == -1)
- return -1;
- if (retval > 0 && fds.revents & POLLIN)
- return retval;
- return 0;
-}
-
-int
set_cloexec(int fd)
{
int flags;