aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/common.c
diff options
context:
space:
mode:
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 4f856ee6c..ce76c516d 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