Have foo.c #include foo.h.
authorDaniel Richard G <skunk@iSKUNK.ORG>
Fri, 10 Aug 2012 12:16:22 +0000 (14:16 +0200)
committerAndre Noll <maan@systemlinux.org>
Wed, 15 Aug 2012 09:39:26 +0000 (11:39 +0200)
This is both to ensure function signature consistency, and to
eliminate GCC's "no previous declaration for _____" warnings.

daemon.c
exec.c
fd.c
ipc.c
signal.c
time.c

index d48e30c..1c6651e 100644 (file)
--- a/daemon.c
+++ b/daemon.c
@@ -22,6 +22,7 @@
 #include "error.h"
 #include "log.h"
 #include "string.h"
+#include "daemon.h"
 
 /**
  * Do the usual stuff to become a daemon.
diff --git a/exec.c b/exec.c
index adfd24d..f00b080 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -17,6 +17,7 @@
 #include "log.h"
 #include "error.h"
 #include "string.h"
+#include "exec.h"
 
 /**
  * Spawn a new process using execvp().
diff --git a/fd.c b/fd.c
index 2b002c7..2ef8e66 100644 (file)
--- a/fd.c
+++ b/fd.c
@@ -4,6 +4,7 @@
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
 
+#include <stdio.h>
 #include <unistd.h>
 #include <assert.h>
 #include <string.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 
-
 #include "gcc-compat.h"
 #include "error.h"
 #include "string.h"
+#include "fd.h"
 
 /**
  * Call a function for each subdirectory of the current working directory.
diff --git a/ipc.c b/ipc.c
index c438939..b9f0405 100644 (file)
--- a/ipc.c
+++ b/ipc.c
@@ -19,6 +19,7 @@
 #include "log.h"
 #include "gcc-compat.h"
 #include "error.h"
+#include "ipc.h"
 
 #if (defined(__GNUC__) && defined(__i386__))
 #define get16bits(d) (*((const uint16_t *) (d)))
index 8dc93a6..a769dfd 100644 (file)
--- a/signal.c
+++ b/signal.c
@@ -24,6 +24,7 @@
 #include "log.h"
 #include "string.h"
 #include "fd.h"
+#include "signal.h"
 
 static int signal_pipe[2];
 
diff --git a/time.c b/time.c
index 3cc1ad6..8197478 100644 (file)
--- a/time.c
+++ b/time.c
@@ -16,6 +16,7 @@
 #include "error.h"
 #include "string.h"
 #include "log.h"
+#include "time.h"
 
 /**
  * Convert struct timeval to milliseconds.