aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBertrand Jacquin <beber@meleeweb.net>2009-05-01 22:26:20 +0200
committerBertrand Jacquin <beber@meleeweb.net>2009-05-01 22:26:20 +0200
commitdd5556974e9e450b60382f74a108a83edb07e048 (patch)
tree96d42d27da052e1512d5498a19d0587abae20cbb
parentwdd: ignore binary (diff)
downloadflxutils-dd5556974e9e450b60382f74a108a83edb07e048.tar.gz
wdd: fix warnings
-rw-r--r--wd/wdd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/wd/wdd.c b/wd/wdd.c
index 4468178..9cd808a 100644
--- a/wd/wdd.c
+++ b/wd/wdd.c
@@ -6,6 +6,8 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
+#include <stdlib.h>
+#include <sys/wait.h>
const char dev_wd_str[] = "/dev/watchdog"; /* standard entry */
const char dev_misc_str[] = "/dev/misc/watchdog"; /* devfs entry */
@@ -19,7 +21,7 @@ const char root_str[] = "/";
static inline void try_malloc() {
void *heap;
- heap = (void*)sbrk(NULL);
+ heap = (void*)sbrk(0);
if (brk(heap + 4096))
exit(1);
memset(heap, 0, 4096);
@@ -53,7 +55,7 @@ static inline int try_stat(const char *file, int do_exit) {
void *heap;
int ret;
- heap = (void*)sbrk(NULL);
+ heap = (void*)sbrk(0);
if (brk(heap + sizeof (struct stat)))
exit(1);
memset(heap, 0, sizeof (struct stat));