Patch from Shaun Jackman:
Replace uptime with time(NULL). time is more portable than uptime and eliminates the need to define uptime, reducing code size slightly.
This commit is contained in:
@ -310,7 +310,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
for (;;) {
|
||||
|
||||
tv.tv_sec = timeout - uptime();
|
||||
tv.tv_sec = timeout - time(NULL);
|
||||
tv.tv_usec = 0;
|
||||
|
||||
if (listen_mode != LISTEN_NONE && fd < 0) {
|
||||
@ -330,7 +330,7 @@ int main(int argc, char *argv[])
|
||||
retval = select(max_fd + 1, &rfds, NULL, NULL, &tv);
|
||||
} else retval = 0; /* If we already timed out, fall through */
|
||||
|
||||
now = uptime();
|
||||
now = time(NULL);
|
||||
if (retval == 0) {
|
||||
/* timeout dropped to zero */
|
||||
switch (state) {
|
||||
|
Reference in New Issue
Block a user