diff options
author | Michael E Brown <mebrown@michaels-house.net> | 2007-12-01 03:06:53 -0600 |
---|---|---|
committer | Michael E Brown <mebrown@michaels-house.net> | 2007-12-01 03:06:53 -0600 |
commit | 9b003eb043da10c98953c813ed01b0005ce6b075 (patch) | |
tree | 421569f802164306ff505e1536381deeeb06c06c | |
parent | 0731f137a0d6a8e6bb67acf9eb240e4e691c8e10 (diff) | |
download | mock-9b003eb043da10c98953c813ed01b0005ce6b075.tar.gz mock-9b003eb043da10c98953c813ed01b0005ce6b075.tar.xz mock-9b003eb043da10c98953c813ed01b0005ce6b075.zip |
fix compile warnings.
-rw-r--r-- | docs/daemontest.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/docs/daemontest.c b/docs/daemontest.c index 4714822..f0e7393 100644 --- a/docs/daemontest.c +++ b/docs/daemontest.c @@ -29,6 +29,11 @@ #include <fcntl.h> #include <signal.h> #include <unistd.h> +#include <stdlib.h> +#include <string.h> +#include <sys/types.h> +#include <sys/stat.h> + #define RUNNING_DIR "/tmp" #define LOCK_FILE "exampled.lock" @@ -87,7 +92,7 @@ char str[10]; signal(SIGTERM,signal_handler); /* catch kill signal */ } -main() +int main() { daemonize(); while(1) sleep(1); /* run */ |