aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/dhcpc.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--networking/udhcp/dhcpc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index dda678933..449b51763 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -188,7 +188,7 @@ int main(int argc, char *argv[])
188 int c, len; 188 int c, len;
189 struct dhcpMessage packet; 189 struct dhcpMessage packet;
190 struct in_addr temp_addr; 190 struct in_addr temp_addr;
191 time_t now; 191 long now;
192 int max_fd; 192 int max_fd;
193 int sig; 193 int sig;
194 194
@@ -290,7 +290,7 @@ int main(int argc, char *argv[])
290 290
291 for (;;) { 291 for (;;) {
292 292
293 tv.tv_sec = timeout - time(0); 293 tv.tv_sec = timeout - uptime();
294 tv.tv_usec = 0; 294 tv.tv_usec = 0;
295 295
296 if (listen_mode != LISTEN_NONE && fd < 0) { 296 if (listen_mode != LISTEN_NONE && fd < 0) {
@@ -310,7 +310,7 @@ int main(int argc, char *argv[])
310 retval = select(max_fd + 1, &rfds, NULL, NULL, &tv); 310 retval = select(max_fd + 1, &rfds, NULL, NULL, &tv);
311 } else retval = 0; /* If we already timed out, fall through */ 311 } else retval = 0; /* If we already timed out, fall through */
312 312
313 now = time(0); 313 now = uptime();
314 if (retval == 0) { 314 if (retval == 0) {
315 /* timeout dropped to zero */ 315 /* timeout dropped to zero */
316 switch (state) { 316 switch (state) {