summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backend.c12
-rw-r--r--blktrace.c2
-rw-r--r--cconv.c1
-rw-r--r--cgroup.c1
-rw-r--r--client.c4
-rw-r--r--client.h6
-rw-r--r--compiler/compiler.h1
-rw-r--r--crc/crc32.c1
-rw-r--r--crc/crc32.h2
-rw-r--r--crc/crc32c-intel.c7
-rw-r--r--crc/crc32c.c2
-rw-r--r--crc/crc32c.h2
-rw-r--r--crc/md5.c1
-rw-r--r--crc/sha1.h2
-rw-r--r--crc/sha256.c1
-rw-r--r--crc/sha256.h2
-rw-r--r--crc/sha3.c1
-rw-r--r--crc/sha512.c1
-rw-r--r--crc/sha512.h2
-rw-r--r--crc/test.c5
-rw-r--r--debug.c5
-rw-r--r--debug.h2
-rw-r--r--diskutil.c3
-rw-r--r--diskutil.h1
-rw-r--r--engines/e4defrag.c4
-rw-r--r--engines/falloc.c4
-rw-r--r--engines/filecreate.c2
-rw-r--r--engines/ftruncate.c8
-rw-r--r--engines/libaio.c2
-rw-r--r--engines/mmap.c1
-rw-r--r--engines/mtd.c3
-rw-r--r--engines/net.c2
-rw-r--r--engines/null.c3
-rw-r--r--engines/sg.c1
-rw-r--r--engines/splice.c1
-rw-r--r--engines/sync.c1
-rw-r--r--eta.c1
-rw-r--r--fifo.c1
-rw-r--r--fifo.h1
-rw-r--r--filesetup.c2
-rw-r--r--fio.c5
-rw-r--r--fio.h1
-rw-r--r--fio_sem.c2
-rw-r--r--fio_time.h1
-rw-r--r--gettime-thread.c2
-rw-r--r--gettime.c7
-rw-r--r--gettime.h2
-rw-r--r--helpers.c9
-rw-r--r--helpers.h5
-rw-r--r--idletime.c1
-rw-r--r--idletime.h5
-rw-r--r--init.c2
-rw-r--r--io_u.c4
-rw-r--r--io_u.h1
-rw-r--r--io_u_queue.h2
-rw-r--r--ioengines.c1
-rw-r--r--ioengines.h5
-rw-r--r--iolog.c2
-rw-r--r--iolog.h2
-rw-r--r--json.c1
-rw-r--r--json.h4
-rw-r--r--lib/bloom.c2
-rw-r--r--lib/gauss.c1
-rw-r--r--lib/ieee754.c1
-rw-r--r--lib/lfsr.c1
-rw-r--r--lib/memalign.c3
-rw-r--r--lib/memalign.h2
-rw-r--r--lib/memcpy.c3
-rw-r--r--lib/num2str.c1
-rw-r--r--lib/output_buffer.c1
-rw-r--r--lib/output_buffer.h2
-rw-r--r--lib/pattern.c2
-rw-r--r--lib/pattern.h2
-rw-r--r--lib/prio_tree.c1
-rw-r--r--lib/prio_tree.h1
-rw-r--r--lib/rand.c1
-rw-r--r--lib/rand.h1
-rw-r--r--lib/strntol.h2
-rw-r--r--lib/zipf.c6
-rw-r--r--lib/zipf.h1
-rw-r--r--libfio.c1
-rw-r--r--log.c1
-rw-r--r--memory.c3
-rw-r--r--options.c4
-rw-r--r--options.h1
-rw-r--r--oslib/strlcat.h2
-rw-r--r--oslib/strndup.c1
-rw-r--r--parse.c4
-rw-r--r--server.c4
-rw-r--r--server.h3
-rw-r--r--smalloc.c8
-rw-r--r--smalloc.h2
-rw-r--r--stat.c3
-rw-r--r--steadystate.c1
-rw-r--r--steadystate.h2
-rw-r--r--t/axmap.c3
-rw-r--r--t/btrace2fio.c2
-rw-r--r--t/dedupe.c10
-rw-r--r--t/gen-rand.c12
-rw-r--r--t/genzipf.c1
-rw-r--r--t/lfsr-test.c4
-rw-r--r--td_error.h2
-rw-r--r--trim.c3
-rw-r--r--trim.h8
-rw-r--r--verify.h1
-rw-r--r--workqueue.h7
106 files changed, 83 insertions, 212 deletions
diff --git a/backend.c b/backend.c
index d82d4948..a92b1e3c 100644
--- a/backend.c
+++ b/backend.c
@@ -22,29 +22,17 @@
*
*/
#include <unistd.h>
-#include <fcntl.h>
#include <string.h>
-#include <limits.h>
#include <signal.h>
-#include <time.h>
-#include <locale.h>
#include <assert.h>
-#include <time.h>
#include <inttypes.h>
#include <sys/stat.h>
#include <sys/wait.h>
-#include <sys/ipc.h>
-#include <sys/mman.h>
#include <math.h>
#include "fio.h"
-#ifndef FIO_NO_HAVE_SHM_H
-#include <sys/shm.h>
-#endif
-#include "hash.h"
#include "smalloc.h"
#include "verify.h"
-#include "trim.h"
#include "diskutil.h"
#include "cgroup.h"
#include "profile.h"
diff --git a/blktrace.c b/blktrace.c
index 4b791d7e..6e4d0a4c 100644
--- a/blktrace.c
+++ b/blktrace.c
@@ -3,10 +3,8 @@
*/
#include <stdio.h>
#include <stdlib.h>
-#include <sys/stat.h>
#include <sys/ioctl.h>
#include <linux/fs.h>
-#include <dirent.h>
#include "flist.h"
#include "fio.h"
diff --git a/cconv.c b/cconv.c
index 92996b1e..dbe0071a 100644
--- a/cconv.c
+++ b/cconv.c
@@ -1,5 +1,6 @@
#include <string.h>
+#include "log.h"
#include "thread_options.h"
static void string_to_cpu(char **dst, const uint8_t *src)
diff --git a/cgroup.c b/cgroup.c
index 4fab977a..380e37e4 100644
--- a/cgroup.c
+++ b/cgroup.c
@@ -5,7 +5,6 @@
#include <stdlib.h>
#include <mntent.h>
#include <sys/stat.h>
-#include <sys/types.h>
#include "fio.h"
#include "flist.h"
#include "cgroup.h"
diff --git a/client.c b/client.c
index bff0adc0..43825d9e 100644
--- a/client.c
+++ b/client.c
@@ -1,13 +1,11 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-#include <limits.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/poll.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include <sys/wait.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <netinet/in.h>
@@ -23,7 +21,7 @@
#include "server.h"
#include "flist.h"
#include "hash.h"
-#include "verify.h"
+#include "verify-state.h"
static void handle_du(struct fio_client *client, struct fio_net_cmd *cmd);
static void handle_ts(struct fio_client *client, struct fio_net_cmd *cmd);
diff --git a/client.h b/client.h
index 90082a34..29e84d0d 100644
--- a/client.h
+++ b/client.h
@@ -1,7 +1,6 @@
#ifndef CLIENT_H
#define CLIENT_H
-#include <sys/socket.h>
#include <sys/un.h>
#include <netinet/in.h>
#include <arpa/inet.h>
@@ -10,7 +9,6 @@
#include "stat.h"
struct fio_net_cmd;
-struct client_ops;
enum {
Client_created = 0,
@@ -83,6 +81,8 @@ typedef void (client_eta_op)(struct jobs_eta *je);
typedef void (client_timed_out_op)(struct fio_client *);
typedef void (client_jobs_eta_op)(struct fio_client *client, struct jobs_eta *je);
+extern struct client_ops fio_client_ops;
+
struct client_ops {
client_cmd_op *text;
client_cmd_op *disk_util;
@@ -105,8 +105,6 @@ struct client_ops {
uint32_t client_type;
};
-extern struct client_ops fio_client_ops;
-
struct client_eta {
unsigned int pending;
struct jobs_eta eta;
diff --git a/compiler/compiler.h b/compiler/compiler.h
index 91a98836..8488aa0d 100644
--- a/compiler/compiler.h
+++ b/compiler/compiler.h
@@ -1,6 +1,5 @@
#ifndef FIO_COMPILER_H
#define FIO_COMPILER_H
-#include <assert.h>
#if __GNUC__ >= 4
#include "compiler-gcc4.h"
diff --git a/crc/crc32.c b/crc/crc32.c
index 4140a8d4..e35f5d93 100644
--- a/crc/crc32.c
+++ b/crc/crc32.c
@@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-#include <inttypes.h>
#include "crc32.h"
static const uint32_t crctab[256] = {
diff --git a/crc/crc32.h b/crc/crc32.h
index a37d7ada..6378e815 100644
--- a/crc/crc32.h
+++ b/crc/crc32.h
@@ -18,6 +18,8 @@
#ifndef CRC32_H
#define CRC32_H
+#include <inttypes.h>
+
extern uint32_t fio_crc32(const void * const, unsigned long);
#endif
diff --git a/crc/crc32c-intel.c b/crc/crc32c-intel.c
index 05a087dc..9a2cefde 100644
--- a/crc/crc32c-intel.c
+++ b/crc/crc32c-intel.c
@@ -1,10 +1,3 @@
-#include <inttypes.h>
-#include <string.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/wait.h>
#include "crc32c.h"
/*
diff --git a/crc/crc32c.c b/crc/crc32c.c
index f6fc6887..34944aea 100644
--- a/crc/crc32c.c
+++ b/crc/crc32c.c
@@ -30,8 +30,6 @@
* any later version.
*
*/
-#include <inttypes.h>
-
#include "crc32c.h"
/*
diff --git a/crc/crc32c.h b/crc/crc32c.h
index be03c1a2..60f60141 100644
--- a/crc/crc32c.h
+++ b/crc/crc32c.h
@@ -18,6 +18,8 @@
#ifndef CRC32C_H
#define CRC32C_H
+#include <inttypes.h>
+
#include "../arch/arch.h"
#include "../lib/types.h"
diff --git a/crc/md5.c b/crc/md5.c
index 64fe48a9..ade4f697 100644
--- a/crc/md5.c
+++ b/crc/md5.c
@@ -2,7 +2,6 @@
* Shamelessly lifted from the 2.6 kernel (crypto/md5.c)
*/
#include <string.h>
-#include <stdint.h>
#include "md5.h"
static void md5_transform(uint32_t *hash, uint32_t const *in)
diff --git a/crc/sha1.h b/crc/sha1.h
index 75317f76..416199ba 100644
--- a/crc/sha1.h
+++ b/crc/sha1.h
@@ -1,6 +1,8 @@
#ifndef FIO_SHA1
#define FIO_SHA1
+#include <inttypes.h>
+
/*
* Based on the Mozilla SHA1 (see mozilla-sha1/sha1.h),
* optimized to do word accesses rather than byte accesses,
diff --git a/crc/sha256.c b/crc/sha256.c
index 2fd17a32..2b39c42e 100644
--- a/crc/sha256.c
+++ b/crc/sha256.c
@@ -17,7 +17,6 @@
*
*/
#include <string.h>
-#include <inttypes.h>
#include "../lib/bswap.h"
#include "sha256.h"
diff --git a/crc/sha256.h b/crc/sha256.h
index b6360336..b904c7d1 100644
--- a/crc/sha256.h
+++ b/crc/sha256.h
@@ -1,6 +1,8 @@
#ifndef FIO_SHA256_H
#define FIO_SHA256_H
+#include <inttypes.h>
+
#define SHA256_DIGEST_SIZE 32
#define SHA256_BLOCK_SIZE 64
diff --git a/crc/sha3.c b/crc/sha3.c
index 2685dce6..c136550a 100644
--- a/crc/sha3.c
+++ b/crc/sha3.c
@@ -13,7 +13,6 @@
*
*/
#include <string.h>
-#include <inttypes.h>
#include "../os/os.h"
diff --git a/crc/sha512.c b/crc/sha512.c
index e069a448..f599cdcc 100644
--- a/crc/sha512.c
+++ b/crc/sha512.c
@@ -12,7 +12,6 @@
*/
#include <string.h>
-#include <inttypes.h>
#include "../lib/bswap.h"
#include "sha512.h"
diff --git a/crc/sha512.h b/crc/sha512.h
index f8b2112a..5adf6271 100644
--- a/crc/sha512.h
+++ b/crc/sha512.h
@@ -1,6 +1,8 @@
#ifndef FIO_SHA512_H
#define FIO_SHA512_H
+#include <inttypes.h>
+
struct fio_sha512_ctx {
uint64_t state[8];
uint32_t count[4];
diff --git a/crc/test.c b/crc/test.c
index b1198726..b57f07a4 100644
--- a/crc/test.c
+++ b/crc/test.c
@@ -1,11 +1,12 @@
+#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "../fio.h"
#include "../gettime.h"
#include "../fio_time.h"
-#include "../verify.h"
+#include "../lib/rand.h"
+#include "../os/os.h"
#include "../crc/md5.h"
#include "../crc/crc64.h"
diff --git a/debug.c b/debug.c
index 2bee5078..d1e2987b 100644
--- a/debug.c
+++ b/debug.c
@@ -1,7 +1,8 @@
+#include <assert.h>
#include <stdarg.h>
-#include <sys/types.h>
-#include <unistd.h>
+
#include "debug.h"
+#include "log.h"
#ifdef FIO_INC_DEBUG
void __dprint(int type, const char *str, ...)
diff --git a/debug.h b/debug.h
index 1765fdb6..8a8cf871 100644
--- a/debug.h
+++ b/debug.h
@@ -1,9 +1,7 @@
#ifndef FIO_DEBUG_H
#define FIO_DEBUG_H
-#include <assert.h>
#include "lib/types.h"
-#include "log.h"
enum {
FD_PROCESS = 0,
diff --git a/diskutil.c b/diskutil.c
index dd8fc6a2..b973120c 100644
--- a/diskutil.c
+++ b/diskutil.c
@@ -1,13 +1,10 @@
#include <stdio.h>
#include <string.h>
-#include <sys/time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/sysmacros.h>
#include <dirent.h>
#include <libgen.h>
-#include <math.h>
-#include <assert.h>
#ifdef CONFIG_VALGRIND_DEV
#include <valgrind/drd.h>
#else
diff --git a/diskutil.h b/diskutil.h
index c1035785..15ec681a 100644
--- a/diskutil.h
+++ b/diskutil.h
@@ -3,7 +3,6 @@
#include "json.h"
#define FIO_DU_NAME_SZ 64
-#include "lib/output_buffer.h"
#include "helper_thread.h"
#include "fio_sem.h"
diff --git a/engines/e4defrag.c b/engines/e4defrag.c
index 4b444888..3619450d 100644
--- a/engines/e4defrag.c
+++ b/engines/e4defrag.c
@@ -9,11 +9,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/uio.h>
#include <errno.h>
-#include <assert.h>
#include <fcntl.h>
#include "../fio.h"
diff --git a/engines/falloc.c b/engines/falloc.c
index 2b00d525..bb3ac850 100644
--- a/engines/falloc.c
+++ b/engines/falloc.c
@@ -9,11 +9,7 @@
*
*/
#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/uio.h>
#include <errno.h>
-#include <assert.h>
#include <fcntl.h>
#include "../fio.h"
diff --git a/engines/filecreate.c b/engines/filecreate.c
index 0c3bcdd6..6fa041cd 100644
--- a/engines/filecreate.c
+++ b/engines/filecreate.c
@@ -5,12 +5,10 @@
* of the file creation.
*/
#include <stdio.h>
-#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include "../fio.h"
-#include "../filehash.h"
struct fc_data {
enum fio_ddir stat_ddir;
diff --git a/engines/ftruncate.c b/engines/ftruncate.c
index e86dbac0..14e115f2 100644
--- a/engines/ftruncate.c
+++ b/engines/ftruncate.c
@@ -6,16 +6,10 @@
* DDIR_WRITE does ftruncate
*
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/uio.h>
#include <errno.h>
-#include <assert.h>
-#include <fcntl.h>
+#include <unistd.h>
#include "../fio.h"
-#include "../filehash.h"
static int fio_ftruncate_queue(struct thread_data *td, struct io_u *io_u)
{
diff --git a/engines/libaio.c b/engines/libaio.c
index e0d7cbba..7d59df38 100644
--- a/engines/libaio.c
+++ b/engines/libaio.c
@@ -4,11 +4,9 @@
* IO engine using the Linux native aio interface.
*
*/
-#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
-#include <assert.h>
#include <libaio.h>
#include "../fio.h"
diff --git a/engines/mmap.c b/engines/mmap.c
index ea7179da..9dbefc82 100644
--- a/engines/mmap.c
+++ b/engines/mmap.c
@@ -7,7 +7,6 @@
*/
#include <stdio.h>
#include <stdlib.h>
-#include <unistd.h>
#include <errno.h>
#include <sys/mman.h>
diff --git a/engines/mtd.c b/engines/mtd.c
index b4a66004..5f822fc1 100644
--- a/engines/mtd.c
+++ b/engines/mtd.c
@@ -4,17 +4,14 @@
* IO engine that reads/writes from MTD character devices.
*
*/
-#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
-#include <unistd.h>
#include <errno.h>
#include <sys/ioctl.h>
#include <mtd/mtd-user.h>
#include "../fio.h"
#include "../optgroup.h"
-#include "../verify.h"
#include "../oslib/libmtd.h"
static libmtd_t desc;
diff --git a/engines/net.c b/engines/net.c
index 37d44fd8..9b385b0c 100644
--- a/engines/net.c
+++ b/engines/net.c
@@ -9,13 +9,11 @@
#include <unistd.h>
#include <signal.h>
#include <errno.h>
-#include <assert.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <sys/poll.h>
-#include <sys/types.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <sys/un.h>
diff --git a/engines/null.c b/engines/null.c
index 0cfc22ad..8c26ad71 100644
--- a/engines/null.c
+++ b/engines/null.c
@@ -13,10 +13,7 @@
* LD_LIBRARY_PATH=./engines ./fio examples/cpp_null.fio
*
*/
-#include <stdio.h>
#include <stdlib.h>
-#include <unistd.h>
-#include <errno.h>
#include <assert.h>
#include "../fio.h"
diff --git a/engines/sg.c b/engines/sg.c
index f2407555..7b18c28e 100644
--- a/engines/sg.c
+++ b/engines/sg.c
@@ -8,7 +8,6 @@
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
-#include <assert.h>
#include <sys/poll.h>
#include "../fio.h"
diff --git a/engines/splice.c b/engines/splice.c
index d5d8ab0e..d322f402 100644
--- a/engines/splice.c
+++ b/engines/splice.c
@@ -9,7 +9,6 @@
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
-#include <assert.h>
#include <sys/poll.h>
#include <sys/mman.h>
diff --git a/engines/sync.c b/engines/sync.c
index 26b98b60..d5b4012f 100644
--- a/engines/sync.c
+++ b/engines/sync.c
@@ -10,7 +10,6 @@
#include <unistd.h>
#include <sys/uio.h>
#include <errno.h>
-#include <assert.h>
#include "../fio.h"
#include "../optgroup.h"
diff --git a/eta.c b/eta.c
index 3126f217..2d549ee9 100644
--- a/eta.c
+++ b/eta.c
@@ -2,7 +2,6 @@
* Status and ETA code
*/
#include <unistd.h>
-#include <fcntl.h>
#include <string.h>
#ifdef CONFIG_VALGRIND_DEV
#include <valgrind/drd.h>
diff --git a/fifo.c b/fifo.c
index 98737e9c..ac0d2157 100644
--- a/fifo.c
+++ b/fifo.c
@@ -24,6 +24,7 @@
#include <string.h>
#include "fifo.h"
+#include "minmax.h"
struct fifo *fifo_alloc(unsigned int size)
{
diff --git a/fifo.h b/fifo.h
index 5e3d3396..61cc5a87 100644
--- a/fifo.h
+++ b/fifo.h
@@ -20,7 +20,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
-#include "minmax.h"
struct fifo {
unsigned char *buffer; /* the buffer holding the data */
diff --git a/filesetup.c b/filesetup.c
index 7cbce132..c115f7b1 100644
--- a/filesetup.c
+++ b/filesetup.c
@@ -5,8 +5,6 @@
#include <dirent.h>
#include <libgen.h>
#include <sys/stat.h>
-#include <sys/mman.h>
-#include <sys/types.h>
#include "fio.h"
#include "smalloc.h"
diff --git a/fio.c b/fio.c
index 7b61ffca..f19db1be 100644
--- a/fio.c
+++ b/fio.c
@@ -21,12 +21,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
-#include <unistd.h>
-#include <locale.h>
-#include <time.h>
-
#include "fio.h"
-#include "smalloc.h"
int main(int argc, char *argv[], char *envp[])
{
diff --git a/fio.h b/fio.h
index 95510487..488fa9a6 100644
--- a/fio.h
+++ b/fio.h
@@ -27,6 +27,7 @@
#include "ioengines.h"
#include "iolog.h"
#include "helpers.h"
+#include "minmax.h"
#include "options.h"
#include "profile.h"
#include "fio_time.h"
diff --git a/fio_sem.c b/fio_sem.c
index 20fcfccc..3b48061c 100644
--- a/fio_sem.c
+++ b/fio_sem.c
@@ -1,3 +1,4 @@
+#include <stdio.h>
#include <string.h>
#include <sys/mman.h>
#include <assert.h>
@@ -7,7 +8,6 @@
#define RUNNING_ON_VALGRIND 0
#endif
-#include "log.h"
#include "fio_sem.h"
#include "pshared.h"
#include "os/os.h"
diff --git a/fio_time.h b/fio_time.h
index 8b4bb255..39fb17ba 100644
--- a/fio_time.h
+++ b/fio_time.h
@@ -1,6 +1,7 @@
#ifndef FIO_TIME_H
#define FIO_TIME_H
+#include <stdint.h>
#include <time.h>
#include <sys/time.h>
#include "lib/types.h"
diff --git a/gettime-thread.c b/gettime-thread.c
index 87f50600..eb535a07 100644
--- a/gettime-thread.c
+++ b/gettime-thread.c
@@ -1,5 +1,3 @@
-#include <unistd.h>
-#include <math.h>
#include <sys/time.h>
#include <time.h>
diff --git a/gettime.c b/gettime.c
index 57c66f7e..87fc29b5 100644
--- a/gettime.c
+++ b/gettime.c
@@ -2,16 +2,9 @@
* Clock functions
*/
-#include <unistd.h>
#include <math.h>
-#include <sys/time.h>
-#include <time.h>
#include "fio.h"
-#include "fio_sem.h"
-#include "smalloc.h"
-
-#include "hash.h"
#include "os/os.h"
#if defined(ARCH_HAVE_CPU_CLOCK)
diff --git a/gettime.h b/gettime.h
index 11e2a7b9..1c4a25c8 100644
--- a/gettime.h
+++ b/gettime.h
@@ -1,6 +1,8 @@
#ifndef FIO_GETTIME_H
#define FIO_GETTIME_H
+#include <sys/time.h>
+
#include "arch/arch.h"
/*
diff --git a/helpers.c b/helpers.c
index 4342b2d2..a0ee3704 100644
--- a/helpers.c
+++ b/helpers.c
@@ -1,13 +1,6 @@
-#include <stdlib.h>
#include <errno.h>
-#include <sys/socket.h>
-#include <sys/time.h>
-#include <netinet/in.h>
-#include <unistd.h>
-#include "compiler/compiler.h"
-#include "arch/arch.h"
-#include "os/os.h"
+#include "helpers.h"
#ifndef CONFIG_LINUX_FALLOCATE
int fallocate(int fd, int mode, off_t offset, off_t len)
diff --git a/helpers.h b/helpers.h
index 5f1865bb..a0b32858 100644
--- a/helpers.h
+++ b/helpers.h
@@ -1,10 +1,9 @@
#ifndef FIO_HELPERS_H
#define FIO_HELPERS_H
-#include "compiler/compiler.h"
-
#include <sys/types.h>
-#include <time.h>
+
+#include "os/os.h"
extern int fallocate(int fd, int mode, off_t offset, off_t len);
extern int posix_fallocate(int fd, off_t offset, off_t len);
diff --git a/idletime.c b/idletime.c
index 90bc1d9e..8762c856 100644
--- a/idletime.c
+++ b/idletime.c
@@ -1,4 +1,5 @@
#include <math.h>
+#include "fio.h"
#include "json.h"
#include "idletime.h"
diff --git a/idletime.h b/idletime.h
index b8376c2c..6c1161a7 100644
--- a/idletime.h
+++ b/idletime.h
@@ -1,8 +1,9 @@
#ifndef FIO_IDLETIME_H
#define FIO_IDLETIME_H
-#include "fio.h"
-#include "lib/output_buffer.h"
+#include <sys/time.h>
+#include <sys/types.h>
+#include "os/os.h"
#define CALIBRATE_RUNS 10
#define CALIBRATE_SCALE 1000
diff --git a/init.c b/init.c
index e47e5384..ab7e3997 100644
--- a/init.c
+++ b/init.c
@@ -4,13 +4,11 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-#include <fcntl.h>
#include <ctype.h>
#include <string.h>
#include <errno.h>
#include <sys/ipc.h>
#include <sys/types.h>
-#include <sys/stat.h>
#include <dlfcn.h>
#ifdef CONFIG_VALGRIND_DEV
#include <valgrind/drd.h>
diff --git a/io_u.c b/io_u.c
index f3b59322..98a7dc56 100644
--- a/io_u.c
+++ b/io_u.c
@@ -1,12 +1,8 @@
#include <unistd.h>
-#include <fcntl.h>
#include <string.h>
-#include <signal.h>
-#include <time.h>
#include <assert.h>
#include "fio.h"
-#include "hash.h"
#include "verify.h"
#include "trim.h"
#include "lib/rand.h"
diff --git a/io_u.h b/io_u.h
index da25efb9..aaa7d972 100644
--- a/io_u.h
+++ b/io_u.h
@@ -3,7 +3,6 @@
#include "compiler/compiler.h"
#include "os/os.h"
-#include "log.h"
#include "io_ddir.h"
#include "debug.h"
#include "file.h"
diff --git a/io_u_queue.h b/io_u_queue.h
index b5b8d2fa..545e2c41 100644
--- a/io_u_queue.h
+++ b/io_u_queue.h
@@ -2,6 +2,8 @@
#define FIO_IO_U_QUEUE
#include <assert.h>
+#include <stddef.h>
+
#include "lib/types.h"
struct io_u;
diff --git a/ioengines.c b/ioengines.c
index 965581aa..a8ec79de 100644
--- a/ioengines.c
+++ b/ioengines.c
@@ -9,7 +9,6 @@
* generic io engine that could be used for other projects.
*
*/
-#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
diff --git a/ioengines.h b/ioengines.h
index 32b18eda..a0674aea 100644
--- a/ioengines.h
+++ b/ioengines.h
@@ -1,9 +1,10 @@
#ifndef FIO_IOENGINE_H
#define FIO_IOENGINE_H
+#include <stddef.h>
+
#include "compiler/compiler.h"
-#include "os/os.h"
-#include "file.h"
+#include "flist.h"
#include "io_u.h"
#define FIO_IOOPS_VERSION 23
diff --git a/iolog.c b/iolog.c
index 460d7a2e..2b5eaf0c 100644
--- a/iolog.c
+++ b/iolog.c
@@ -4,7 +4,6 @@
*/
#include <stdio.h>
#include <stdlib.h>
-#include <libgen.h>
#include <assert.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -15,7 +14,6 @@
#include "flist.h"
#include "fio.h"
-#include "verify.h"
#include "trim.h"
#include "filelock.h"
#include "smalloc.h"
diff --git a/iolog.h b/iolog.h
index 70981f99..f70eb61e 100644
--- a/iolog.h
+++ b/iolog.h
@@ -1,6 +1,8 @@
#ifndef FIO_IOLOG_H
#define FIO_IOLOG_H
+#include <stdio.h>
+
#include "lib/rbtree.h"
#include "lib/ieee754.h"
#include "flist.h"
diff --git a/json.c b/json.c
index e0227ec6..75212c85 100644
--- a/json.c
+++ b/json.c
@@ -1,6 +1,5 @@
#include <stdlib.h>
#include <string.h>
-#include <stdio.h>
#include <errno.h>
#include <stdarg.h>
#include "json.h"
diff --git a/json.h b/json.h
index d7017e06..bcc712cd 100644
--- a/json.h
+++ b/json.h
@@ -3,10 +3,6 @@
#include "lib/output_buffer.h"
-struct json_object;
-struct json_array;
-struct json_pair;
-
#define JSON_TYPE_STRING 0
#define JSON_TYPE_INTEGER 1
#define JSON_TYPE_FLOAT 2
diff --git a/lib/bloom.c b/lib/bloom.c
index bb81dbbd..f4f9b6b9 100644
--- a/lib/bloom.c
+++ b/lib/bloom.c
@@ -1,9 +1,7 @@
#include <stdlib.h>
-#include <inttypes.h>
#include "bloom.h"
#include "../hash.h"
-#include "../minmax.h"
#include "../crc/xxhash.h"
#include "../crc/murmur3.h"
#include "../crc/crc32c.h"
diff --git a/lib/gauss.c b/lib/gauss.c
index f974490f..1d24e187 100644
--- a/lib/gauss.c
+++ b/lib/gauss.c
@@ -1,6 +1,5 @@
#include <math.h>
#include <string.h>
-#include <stdio.h>
#include "../hash.h"
#include "gauss.h"
diff --git a/lib/ieee754.c b/lib/ieee754.c
index c7742a2d..2154065c 100644
--- a/lib/ieee754.c
+++ b/lib/ieee754.c
@@ -5,7 +5,6 @@
*
* Below code was granted to the public domain.
*/
-#include <inttypes.h>
#include "ieee754.h"
uint64_t pack754(long double f, unsigned bits, unsigned expbits)
diff --git a/lib/lfsr.c b/lib/lfsr.c
index 0c0072cc..a4f1fb13 100644
--- a/lib/lfsr.c
+++ b/lib/lfsr.c
@@ -1,5 +1,4 @@
#include <stdio.h>
-#include <math.h>
#include "lfsr.h"
#include "../compiler/compiler.h"
diff --git a/lib/memalign.c b/lib/memalign.c
index bfbd1e80..e774c19c 100644
--- a/lib/memalign.c
+++ b/lib/memalign.c
@@ -1,6 +1,5 @@
-#include <stdlib.h>
#include <assert.h>
-#include <inttypes.h>
+#include <stdlib.h>
#include "memalign.h"
diff --git a/lib/memalign.h b/lib/memalign.h
index df412e28..c2eb1702 100644
--- a/lib/memalign.h
+++ b/lib/memalign.h
@@ -1,6 +1,8 @@
#ifndef FIO_MEMALIGN_H
#define FIO_MEMALIGN_H
+#include <inttypes.h>
+
extern void *fio_memalign(size_t alignment, size_t size);
extern void fio_memfree(void *ptr, size_t size);
diff --git a/lib/memcpy.c b/lib/memcpy.c
index 00e65aa7..cf8572e2 100644
--- a/lib/memcpy.c
+++ b/lib/memcpy.c
@@ -1,3 +1,4 @@
+#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -6,7 +7,7 @@
#include "rand.h"
#include "../fio_time.h"
#include "../gettime.h"
-#include "../fio.h"
+#include "../os/os.h"
#define BUF_SIZE 32 * 1024 * 1024ULL
diff --git a/lib/num2str.c b/lib/num2str.c
index 8d088413..387c5d7b 100644
--- a/lib/num2str.c
+++ b/lib/num2str.c
@@ -1,3 +1,4 @@
+#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff --git a/lib/output_buffer.c b/lib/output_buffer.c
index f6c304bd..beb8a142 100644
--- a/lib/output_buffer.c
+++ b/lib/output_buffer.c
@@ -1,4 +1,3 @@
-#include <stdio.h>
#include <string.h>
#include <stdlib.h>
diff --git a/lib/output_buffer.h b/lib/output_buffer.h
index a235af20..389ed5b7 100644
--- a/lib/output_buffer.h
+++ b/lib/output_buffer.h
@@ -1,7 +1,7 @@
#ifndef FIO_OUTPUT_BUFFER_H
#define FIO_OUTPUT_BUFFER_H
-#include <unistd.h>
+#include <stddef.h>
struct buf_output {
char *buf;
diff --git a/lib/pattern.c b/lib/pattern.c
index 31ee4eaf..2024f2e9 100644
--- a/lib/pattern.c
+++ b/lib/pattern.c
@@ -4,8 +4,6 @@
#include <limits.h>
#include <errno.h>
#include <assert.h>
-#include <sys/types.h>
-#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
diff --git a/lib/pattern.h b/lib/pattern.h
index 9f937f02..2d655ad0 100644
--- a/lib/pattern.h
+++ b/lib/pattern.h
@@ -1,8 +1,6 @@
#ifndef FIO_PARSE_PATTERN_H
#define FIO_PARSE_PATTERN_H
-struct pattern_fmt;
-
/**
* Pattern format description. The input for 'parse_pattern'.
* Describes format with its name and callback, which should
diff --git a/lib/prio_tree.c b/lib/prio_tree.c
index de3fe1c0..d8e1b89a 100644
--- a/lib/prio_tree.c
+++ b/lib/prio_tree.c
@@ -11,6 +11,7 @@
* 02Feb2004 Initial version
*/
+#include <assert.h>
#include <stdlib.h>
#include <limits.h>
diff --git a/lib/prio_tree.h b/lib/prio_tree.h
index e1491dbd..9bd458f1 100644
--- a/lib/prio_tree.h
+++ b/lib/prio_tree.h
@@ -2,7 +2,6 @@
#define _LINUX_PRIO_TREE_H
#include <inttypes.h>
-#include "../hash.h"
struct prio_tree_node {
struct prio_tree_node *left;
diff --git a/lib/rand.c b/lib/rand.c
index 3f60a67a..46ffe4fb 100644
--- a/lib/rand.c
+++ b/lib/rand.c
@@ -34,7 +34,6 @@
*/
#include <string.h>
-#include <assert.h>
#include "rand.h"
#include "pattern.h"
#include "../hash.h"
diff --git a/lib/rand.h b/lib/rand.h
index bff4a351..8832c73a 100644
--- a/lib/rand.h
+++ b/lib/rand.h
@@ -4,7 +4,6 @@
#include <inttypes.h>
#include <assert.h>
#include "types.h"
-#include "../arch/arch.h"
#define FRAND32_MAX (-1U)
#define FRAND64_MAX (-1ULL)
diff --git a/lib/strntol.h b/lib/strntol.h
index 68f5d1b7..59c090d3 100644
--- a/lib/strntol.h
+++ b/lib/strntol.h
@@ -1,6 +1,8 @@
#ifndef FIO_STRNTOL_H
#define FIO_STRNTOL_H
+#include <stdint.h>
+
long strntol(const char *str, size_t sz, char **end, int base);
#endif
diff --git a/lib/zipf.c b/lib/zipf.c
index 3d535c79..1ff85680 100644
--- a/lib/zipf.c
+++ b/lib/zipf.c
@@ -1,11 +1,5 @@
#include <math.h>
#include <string.h>
-#include <inttypes.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#include "ieee754.h"
#include "zipf.h"
#include "../minmax.h"
#include "../hash.h"
diff --git a/lib/zipf.h b/lib/zipf.h
index af2d0e64..a4aa163c 100644
--- a/lib/zipf.h
+++ b/lib/zipf.h
@@ -3,6 +3,7 @@
#include <inttypes.h>
#include "rand.h"
+#include "types.h"
struct zipf_state {
uint64_t nranges;
diff --git a/libfio.c b/libfio.c
index 80159b4d..6faf32a4 100644
--- a/libfio.c
+++ b/libfio.c
@@ -23,7 +23,6 @@
*/
#include <string.h>
-#include <sys/types.h>
#include <signal.h>
#include <stdint.h>
#include <locale.h>
diff --git a/log.c b/log.c
index 7e8b13b3..46e5034e 100644
--- a/log.c
+++ b/log.c
@@ -1,5 +1,4 @@
#include <unistd.h>
-#include <fcntl.h>
#include <string.h>
#include <stdarg.h>
#include <syslog.h>
diff --git a/memory.c b/memory.c
index 04dc3be8..5f0225f7 100644
--- a/memory.c
+++ b/memory.c
@@ -1,11 +1,10 @@
/*
* Memory helpers
*/
-#include <sys/types.h>
-#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/mman.h>
+#include <sys/stat.h>
#include "fio.h"
#ifndef FIO_NO_HAVE_SHM_H
diff --git a/options.c b/options.c
index 68105212..45a5b82b 100644
--- a/options.c
+++ b/options.c
@@ -4,16 +4,12 @@
#include <ctype.h>
#include <string.h>
#include <assert.h>
-#include <libgen.h>
-#include <fcntl.h>
-#include <sys/types.h>
#include <sys/stat.h>
#include <netinet/in.h>
#include "fio.h"
#include "verify.h"
#include "parse.h"
-#include "lib/fls.h"
#include "lib/pattern.h"
#include "options.h"
#include "optgroup.h"
diff --git a/options.h b/options.h
index 83a58e27..59024efc 100644
--- a/options.h
+++ b/options.h
@@ -6,7 +6,6 @@
#include <string.h>
#include <inttypes.h>
#include "parse.h"
-#include "flist.h"
#include "lib/types.h"
int add_option(struct fio_option *);
diff --git a/oslib/strlcat.h b/oslib/strlcat.h
index baeace40..720034fe 100644
--- a/oslib/strlcat.h
+++ b/oslib/strlcat.h
@@ -1,6 +1,8 @@
#ifndef FIO_STRLCAT_H
#define FIO_STRLCAT_H
+#include <stddef.h>
+
size_t strlcat(char *dst, const char *src, size_t size);
#endif
diff --git a/oslib/strndup.c b/oslib/strndup.c
index 7b0fcb51..40e92f82 100644
--- a/oslib/strndup.c
+++ b/oslib/strndup.c
@@ -1,4 +1,5 @@
#include <stdlib.h>
+
#include "strndup.h"
#ifndef CONFIG_HAVE_STRNDUP
diff --git a/parse.c b/parse.c
index fdb66115..33fcf465 100644
--- a/parse.c
+++ b/parse.c
@@ -3,18 +3,16 @@
*/
#include <stdio.h>
#include <stdlib.h>
-#include <unistd.h>
#include <ctype.h>
#include <string.h>
#include <errno.h>
#include <limits.h>
-#include <stdlib.h>
-#include <math.h>
#include <float.h>
#include "compiler/compiler.h"
#include "parse.h"
#include "debug.h"
+#include "log.h"
#include "options.h"
#include "optgroup.h"
#include "minmax.h"
diff --git a/server.c b/server.c
index 65d4484e..6f858109 100644
--- a/server.c
+++ b/server.c
@@ -1,8 +1,6 @@
#include <stdio.h>
#include <stdlib.h>
-#include <stdarg.h>
#include <unistd.h>
-#include <limits.h>
#include <errno.h>
#include <sys/poll.h>
#include <sys/types.h>
@@ -25,7 +23,7 @@
#include "server.h"
#include "crc/crc16.h"
#include "lib/ieee754.h"
-#include "verify.h"
+#include "verify-state.h"
#include "smalloc.h"
int fio_net_port = FIO_NET_PORT;
diff --git a/server.h b/server.h
index d652d31c..1eee7dcf 100644
--- a/server.h
+++ b/server.h
@@ -7,7 +7,6 @@
#include <netinet/in.h>
#include "stat.h"
-#include "os/os.h"
#include "diskutil.h"
#define FIO_NET_PORT 8765
@@ -217,8 +216,6 @@ extern int fio_server_parse_host(const char *, int, struct in_addr *, struct in6
extern const char *fio_server_op(unsigned int);
extern void fio_server_got_signal(int);
-struct thread_stat;
-struct group_run_stats;
extern void fio_server_send_ts(struct thread_stat *, struct group_run_stats *);
extern void fio_server_send_gs(struct group_run_stats *);
extern void fio_server_send_du(void);
diff --git a/smalloc.c b/smalloc.c
index 13995acc..7b1690ad 100644
--- a/smalloc.c
+++ b/smalloc.c
@@ -3,15 +3,8 @@
* that can be shared across processes and threads
*/
#include <sys/mman.h>
-#include <stdio.h>
-#include <stdlib.h>
#include <assert.h>
#include <string.h>
-#include <unistd.h>
-#include <inttypes.h>
-#include <sys/types.h>
-#include <limits.h>
-#include <fcntl.h>
#ifdef CONFIG_VALGRIND_DEV
#include <valgrind/valgrind.h>
#else
@@ -22,7 +15,6 @@
#include "fio.h"
#include "fio_sem.h"
-#include "arch/arch.h"
#include "os/os.h"
#include "smalloc.h"
#include "log.h"
diff --git a/smalloc.h b/smalloc.h
index 4b551e3e..8df10e6f 100644
--- a/smalloc.h
+++ b/smalloc.h
@@ -1,6 +1,8 @@
#ifndef FIO_SMALLOC_H
#define FIO_SMALLOC_H
+#include <stddef.h>
+
extern void *smalloc(size_t);
extern void *scalloc(size_t, size_t);
extern void sfree(void *);
diff --git a/stat.c b/stat.c
index 98ab6389..a837ed90 100644
--- a/stat.c
+++ b/stat.c
@@ -1,10 +1,7 @@
#include <stdio.h>
#include <string.h>
#include <sys/time.h>
-#include <sys/types.h>
#include <sys/stat.h>
-#include <dirent.h>
-#include <libgen.h>
#include <math.h>
#include "fio.h"
diff --git a/steadystate.c b/steadystate.c
index 2017ca67..1e3a5468 100644
--- a/steadystate.c
+++ b/steadystate.c
@@ -2,7 +2,6 @@
#include "fio.h"
#include "steadystate.h"
-#include "helper_thread.h"
bool steadystate_enabled = false;
diff --git a/steadystate.h b/steadystate.h
index 9fd88ee8..51472c46 100644
--- a/steadystate.h
+++ b/steadystate.h
@@ -1,9 +1,7 @@
#ifndef FIO_STEADYSTATE_H
#define FIO_STEADYSTATE_H
-#include "stat.h"
#include "thread_options.h"
-#include "lib/ieee754.h"
extern void steadystate_free(struct thread_data *);
extern void steadystate_check(void);
diff --git a/t/axmap.c b/t/axmap.c
index a803ce47..eef464ff 100644
--- a/t/axmap.c
+++ b/t/axmap.c
@@ -1,8 +1,5 @@
#include <stdio.h>
#include <stdlib.h>
-#include <fcntl.h>
-#include <string.h>
-#include <unistd.h>
#include <inttypes.h>
#include "../lib/lfsr.h"
diff --git a/t/btrace2fio.c b/t/btrace2fio.c
index 4cdb38d1..a8a9d629 100644
--- a/t/btrace2fio.c
+++ b/t/btrace2fio.c
@@ -1,5 +1,4 @@
#include <stdio.h>
-#include <stdio.h>
#include <unistd.h>
#include <inttypes.h>
#include <math.h>
@@ -12,6 +11,7 @@
#include "../blktrace_api.h"
#include "../os/os.h"
#include "../log.h"
+#include "../minmax.h"
#include "../oslib/linux-dev-lookup.h"
#define TRACE_FIFO_SIZE 8192
diff --git a/t/dedupe.c b/t/dedupe.c
index 1b4277c1..37120e18 100644
--- a/t/dedupe.c
+++ b/t/dedupe.c
@@ -3,16 +3,12 @@
* just scans the filename for extents of the given size, checksums them,
* and orders them up.
*/
+#include <fcntl.h>
+#include <inttypes.h>
#include <stdio.h>
-#include <stdio.h>
+#include <string.h>
#include <unistd.h>
-#include <inttypes.h>
-#include <assert.h>
-#include <sys/types.h>
#include <sys/stat.h>
-#include <sys/ioctl.h>
-#include <fcntl.h>
-#include <string.h>
#include "../flist.h"
#include "../log.h"
diff --git a/t/gen-rand.c b/t/gen-rand.c
index 4e9d39c6..c379053d 100644
--- a/t/gen-rand.c
+++ b/t/gen-rand.c
@@ -1,17 +1,11 @@
+#include <math.h>
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
-#include <inttypes.h>
-#include <assert.h>
-#include <math.h>
-#include <string.h>
#include "../lib/types.h"
-#include "../log.h"
-#include "../lib/lfsr.h"
-#include "../lib/axmap.h"
-#include "../smalloc.h"
-#include "../minmax.h"
#include "../lib/rand.h"
+#include "../log.h"
int main(int argc, char *argv[])
{
diff --git a/t/genzipf.c b/t/genzipf.c
index 9faec389..4fc10ae7 100644
--- a/t/genzipf.c
+++ b/t/genzipf.c
@@ -14,7 +14,6 @@
*/
#include <stdio.h>
#include <stdlib.h>
-#include <fcntl.h>
#include <string.h>
#include <unistd.h>
diff --git a/t/lfsr-test.c b/t/lfsr-test.c
index 4009b62e..abdbafb5 100644
--- a/t/lfsr-test.c
+++ b/t/lfsr-test.c
@@ -1,11 +1,7 @@
#include <stdio.h>
#include <stdlib.h>
-#include <time.h>
#include <math.h>
#include <string.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
#include "../lib/lfsr.h"
#include "../gettime.h"
diff --git a/td_error.h b/td_error.h
index 1b38a534..1cc3a753 100644
--- a/td_error.h
+++ b/td_error.h
@@ -1,6 +1,8 @@
#ifndef FIO_TD_ERROR_H
#define FIO_TD_ERROR_H
+#include "io_ddir.h"
+
/*
* What type of errors to continue on when continue_on_error is used,
* and what type of errors to ignore when ignore_error is used.
diff --git a/trim.c b/trim.c
index 78cf6724..bf825db3 100644
--- a/trim.c
+++ b/trim.c
@@ -1,11 +1,8 @@
/*
* TRIM/DISCARD support
*/
-#include <unistd.h>
-#include <fcntl.h>
#include <string.h>
#include <assert.h>
-#include <pthread.h>
#include "fio.h"
#include "trim.h"
diff --git a/trim.h b/trim.h
index 37f5d7c8..fe8f9fe9 100644
--- a/trim.h
+++ b/trim.h
@@ -1,9 +1,13 @@
#ifndef FIO_TRIM_H
#define FIO_TRIM_H
-#include "fio.h"
-
#ifdef FIO_HAVE_TRIM
+#include "flist.h"
+#include "iolog.h"
+#include "compiler/compiler.h"
+#include "lib/types.h"
+#include "os/os.h"
+
extern bool __must_check get_next_trim(struct thread_data *td, struct io_u *io_u);
extern bool io_u_should_trim(struct thread_data *td, struct io_u *io_u);
diff --git a/verify.h b/verify.h
index 321e6485..64121a51 100644
--- a/verify.h
+++ b/verify.h
@@ -2,6 +2,7 @@
#define FIO_VERIFY_H
#include <stdint.h>
+#include "compiler/compiler.h"
#include "verify-state.h"
#define FIO_HDR_MAGIC 0xacca
diff --git a/workqueue.h b/workqueue.h
index e35c181a..0a62b5f7 100644
--- a/workqueue.h
+++ b/workqueue.h
@@ -1,7 +1,14 @@
#ifndef FIO_RATE_H
#define FIO_RATE_H
+#include <inttypes.h>
+#include <pthread.h>
+
#include "flist.h"
+#include "lib/types.h"
+
+struct sk_out;
+struct thread_data;
struct workqueue_work {
struct flist_head list;