From 53f7ed163ec06830f29788fff4a8cb9682231cf8 Mon Sep 17 00:00:00 2001 From: Willem Jan Withagen Date: Sun, 10 Jun 2018 15:25:46 +0200 Subject: [PATCH] common: use include/types.h early on, otherwise Clang will error. This is due that FreeBSD does not have loff_t as type. And with the wrong order of includes the standard linux typedef is included and used. In file included from /home/wjw/wip/src/common/buffer.cc:21: /home/wjw/wip/src/include/buffer_raw.h:92:41: error: unknown type name 'loff_t'; did you mean 'off_t'? virtual int zero_copy_to_fd(int fd, loff_t *offset) { ^~~~~~ off_t /usr/include/sys/uio.h:49:17: note: 'off_t' declared here typedef __off_t off_t; ^ 1 error generated. Signed-off-by: Willem Jan Withagen --- src/common/buffer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/buffer.cc b/src/common/buffer.cc index b60fbe99ff50b..3d01a460af2f4 100644 --- a/src/common/buffer.cc +++ b/src/common/buffer.cc @@ -18,6 +18,7 @@ #include +#include "include/types.h" #include "include/buffer_raw.h" #include "include/compat.h" #include "include/mempool.h" @@ -30,7 +31,6 @@ #include "common/valgrind.h" #include "common/deleter.h" #include "common/RWLock.h" -#include "include/types.h" #include "include/spinlock.h" #include "include/scope_guard.h" -- 2.39.5