From 973a4a01011eec5df6ad27923c465ad4f062505d Mon Sep 17 00:00:00 2001 From: Willem Jan Withagen Date: Sat, 27 May 2017 20:31:48 +0200 Subject: [PATCH 1/2] build/include: Redo som includes for FreeBSD - During include cleanup just a too bit much was removed for FreeBSD to get things compiled. This redoes some of the includes. Tracker: http://tracker.ceph.com/issues/19883 Signed-off-by: Willem Jan Withagen --- src/common/SubProcess.h | 4 ++++ src/common/event_socket.h | 5 ++++- src/common/io_priority.cc | 7 +++++-- src/common/ipaddr.cc | 8 +++++++- src/common/module.c | 3 +++ src/test/test_ipaddr.cc | 1 + 6 files changed, 24 insertions(+), 4 deletions(-) diff --git a/src/common/SubProcess.h b/src/common/SubProcess.h index c35ae1fd31c5a..ce9559c5eeca1 100644 --- a/src/common/SubProcess.h +++ b/src/common/SubProcess.h @@ -24,6 +24,10 @@ #include #include #include +#if defined(__FreeBSD__) +#include +#include +#endif /** * SubProcess: diff --git a/src/common/event_socket.h b/src/common/event_socket.h index 1f1f2c2d10bf9..79e8e15a716a8 100644 --- a/src/common/event_socket.h +++ b/src/common/event_socket.h @@ -17,8 +17,11 @@ #ifndef CEPH_COMMON_EVENT_SOCKET_H #define CEPH_COMMON_EVENT_SOCKET_H -#include "include/event_type.h" #include +#if defined(__FreeBSD__) +#include +#endif +#include "include/event_type.h" class EventSocket { int socket; diff --git a/src/common/io_priority.cc b/src/common/io_priority.cc index 72ac637268f7f..c635555ad682d 100644 --- a/src/common/io_priority.cc +++ b/src/common/io_priority.cc @@ -12,14 +12,17 @@ * */ -#include "io_priority.h" - #include +#if defined(__FreeBSD__) +#include +#endif #ifdef __linux__ #include /* For SYS_xxx definitions */ #endif #include +#include "io_priority.h" + pid_t ceph_gettid(void) { #ifdef __linux__ diff --git a/src/common/ipaddr.cc b/src/common/ipaddr.cc index dcf5932345c02..41add2de24e61 100644 --- a/src/common/ipaddr.cc +++ b/src/common/ipaddr.cc @@ -1,9 +1,15 @@ -#include "include/ipaddr.h" #include #include #include #include +#if defined(__FreeBSD__) +#include +#include +#include +#endif + +#include "include/ipaddr.h" static void netmask_ipv4(const struct in_addr *addr, unsigned int prefix_len, diff --git a/src/common/module.c b/src/common/module.c index 06b32ed7d3ea9..f19f74324c752 100644 --- a/src/common/module.c +++ b/src/common/module.c @@ -15,6 +15,9 @@ #include #include #include +#if defined(__FreeBSD__) +#include +#endif /* * TODO: Switch to libkmod when we abandon older platforms. The APIs diff --git a/src/test/test_ipaddr.cc b/src/test/test_ipaddr.cc index f6ecd2de51ff9..bf69b90a700a3 100644 --- a/src/test/test_ipaddr.cc +++ b/src/test/test_ipaddr.cc @@ -4,6 +4,7 @@ #if defined(__FreeBSD__) #include #include +#include #endif #include #include From 2f1b0c1863254461c6f3eb3195093303d6148a9d Mon Sep 17 00:00:00 2001 From: Willem Jan Withagen Date: Sat, 27 May 2017 20:43:12 +0200 Subject: [PATCH 2/2] erasure-code/isa/ErasureCodePluginIsa.cc: fixup includes - Buffer.h is needed to prevent Clang seriously complaining about missing and wrong forward declarations of ceph::buffer:ptr including buffer_fwd.h does not help. Signed-off-by: Willem Jan Withagen --- src/erasure-code/isa/ErasureCodePluginIsa.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/erasure-code/isa/ErasureCodePluginIsa.cc b/src/erasure-code/isa/ErasureCodePluginIsa.cc index b3682bd954f91..0641f457d49fc 100644 --- a/src/erasure-code/isa/ErasureCodePluginIsa.cc +++ b/src/erasure-code/isa/ErasureCodePluginIsa.cc @@ -25,6 +25,7 @@ // ----------------------------------------------------------------------------- #include "ceph_ver.h" +#include "include/buffer.h" #include "ErasureCodePluginIsa.h" #include "ErasureCodeIsa.h" // -----------------------------------------------------------------------------