summaryrefslogtreecommitdiff
path: root/networking/udhcp/common.c
diff options
context:
space:
mode:
authorRuss Dill2004-05-19 08:29:05 +0000
committerRuss Dill2004-05-19 08:29:05 +0000
commit309c7b71e66f45225f369591caf2441bfa2d1670 (patch)
tree364fc965115e6ba6010ec150f29334af25b159ee /networking/udhcp/common.c
parent91e006c1adf660a0180b6d3988a14150ccb36fa9 (diff)
downloadbusybox-309c7b71e66f45225f369591caf2441bfa2d1670.zip
busybox-309c7b71e66f45225f369591caf2441bfa2d1670.tar.gz
fix timewarp in client (server fix later)
Diffstat (limited to 'networking/udhcp/common.c')
-rw-r--r--networking/udhcp/common.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/networking/udhcp/common.c b/networking/udhcp/common.c
index 4f856ee..ce76c51 100644
--- a/networking/udhcp/common.c
+++ b/networking/udhcp/common.c
@@ -29,6 +29,7 @@
#include <signal.h>
#include <paths.h>
#include <sys/socket.h>
+#include <sys/sysinfo.h>
#include <stdarg.h>
#include "common.h"
@@ -37,6 +38,14 @@
static int daemonized;
+long uptime(void)
+{
+ struct sysinfo info;
+ sysinfo(&info);
+ printf("uptime %d\n", info.uptime);
+ return info.uptime;
+}
+
/*
* This function makes sure our first socket calls