From c17bfe9242f34690bd26747144f5351011e91b41 Mon Sep 17 00:00:00 2001
From: Daniel Richard G <skunk@iSKUNK.ORG>
Date: Fri, 10 Aug 2012 14:16:22 +0200
Subject: [PATCH] Have foo.c #include foo.h.

This is both to ensure function signature consistency, and to
eliminate GCC's "no previous declaration for _____" warnings.
---
 daemon.c | 1 +
 exec.c   | 1 +
 fd.c     | 3 ++-
 ipc.c    | 1 +
 signal.c | 1 +
 time.c   | 1 +
 6 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/daemon.c b/daemon.c
index d48e30c..1c6651e 100644
--- 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
--- 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
--- 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>
@@ -13,10 +14,10 @@
 #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
--- 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)))
diff --git a/signal.c b/signal.c
index 8dc93a6..a769dfd 100644
--- 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
--- 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.
-- 
2.39.5