summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/bar.c2
-rw-r--r--src/bfstd.c1
-rw-r--r--src/bfstd.h2
-rw-r--r--src/bftw.c3
-rw-r--r--src/ctx.h1
-rw-r--r--src/diag.c1
-rw-r--r--src/exec.c1
-rw-r--r--src/opt.c3
-rw-r--r--src/printf.c1
-rw-r--r--src/xregex.c2
-rw-r--r--src/xspawn.c2
11 files changed, 10 insertions, 9 deletions
diff --git a/src/bar.c b/src/bar.c
index c656b14..37d33c8 100644
--- a/src/bar.c
+++ b/src/bar.c
@@ -16,6 +16,7 @@
#include "bar.h"
#include "bfstd.h"
+#include "config.h"
#include "dstring.h"
#include <errno.h>
#include <fcntl.h>
@@ -25,7 +26,6 @@
#include <stdio.h>
#include <string.h>
#include <sys/ioctl.h>
-#include <unistd.h>
struct bfs_bar {
int fd;
diff --git a/src/bfstd.c b/src/bfstd.c
index 043e8e5..1561796 100644
--- a/src/bfstd.c
+++ b/src/bfstd.c
@@ -16,7 +16,6 @@
#include "bfstd.h"
#include "config.h"
-#include "dstring.h"
#include "xregex.h"
#include <assert.h>
#include <errno.h>
diff --git a/src/bfstd.h b/src/bfstd.h
index 3ad2116..9a06ac1 100644
--- a/src/bfstd.h
+++ b/src/bfstd.h
@@ -153,7 +153,7 @@ int xmajor(dev_t dev);
*/
int xminor(dev_t dev);
-#include <unistd.h>
+// #include <unistd.h>
/**
* Like dup(), but set the FD_CLOEXEC flag.
diff --git a/src/bftw.c b/src/bftw.c
index 378a225..8c88101 100644
--- a/src/bftw.c
+++ b/src/bftw.c
@@ -32,8 +32,8 @@
#include "bftw.h"
#include "bfstd.h"
+#include "config.h"
#include "dir.h"
-#include "darray.h"
#include "dstring.h"
#include "mtab.h"
#include "stat.h"
@@ -45,7 +45,6 @@
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
-#include <unistd.h>
/**
* A file.
diff --git a/src/ctx.h b/src/ctx.h
index 3ad7f85..6c4ef33 100644
--- a/src/ctx.h
+++ b/src/ctx.h
@@ -24,6 +24,7 @@
#include "bftw.h"
#include "trie.h"
#include <stdbool.h>
+#include <stddef.h>
#include <sys/resource.h>
/**
diff --git a/src/diag.c b/src/diag.c
index a9be5b4..80d988f 100644
--- a/src/diag.c
+++ b/src/diag.c
@@ -22,6 +22,7 @@
#include <assert.h>
#include <errno.h>
#include <stdarg.h>
+#include <stddef.h>
void bfs_perror(const struct bfs_ctx *ctx, const char *str) {
bfs_error(ctx, "%s: %m.\n", str);
diff --git a/src/exec.c b/src/exec.c
index afbdcb7..b88a8b8 100644
--- a/src/exec.c
+++ b/src/exec.c
@@ -19,6 +19,7 @@
#include "bftw.h"
#include "ctx.h"
#include "color.h"
+#include "config.h"
#include "diag.h"
#include "dstring.h"
#include "xspawn.h"
diff --git a/src/opt.c b/src/opt.c
index 80fdd43..cece337 100644
--- a/src/opt.c
+++ b/src/opt.c
@@ -41,6 +41,7 @@
#include "opt.h"
#include "color.h"
+#include "config.h"
#include "ctx.h"
#include "diag.h"
#include "eval.h"
@@ -50,9 +51,7 @@
#include <limits.h>
#include <stdarg.h>
#include <stdbool.h>
-#include <stdint.h>
#include <stdio.h>
-#include <string.h>
#include <unistd.h>
static char *fake_and_arg = "-a";
diff --git a/src/printf.c b/src/printf.c
index 97c203f..57ff5fd 100644
--- a/src/printf.c
+++ b/src/printf.c
@@ -18,6 +18,7 @@
#include "bfstd.h"
#include "bftw.h"
#include "color.h"
+#include "config.h"
#include "ctx.h"
#include "darray.h"
#include "diag.h"
diff --git a/src/xregex.c b/src/xregex.c
index e8d6b23..3e14280 100644
--- a/src/xregex.c
+++ b/src/xregex.c
@@ -15,8 +15,6 @@
****************************************************************************/
#include "xregex.h"
-#include "bfstd.h"
-#include "config.h"
#include <assert.h>
#include <errno.h>
#include <stdlib.h>
diff --git a/src/xspawn.c b/src/xspawn.c
index 5d2c320..f76267b 100644
--- a/src/xspawn.c
+++ b/src/xspawn.c
@@ -19,8 +19,10 @@
#include "config.h"
#include <errno.h>
#include <fcntl.h>
+#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
+#include <sys/resource.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>