From c1943878d3345bd8f9bd598541c48376531e2344 Mon Sep 17 00:00:00 2001 From: Willem Jan Withagen Date: Thu, 25 Feb 2016 00:39:27 +0100 Subject: [PATCH] Clang;common/config.cc basename() requires libgen.h includes But Linux already has it defined in string.h with (const char*) as parameter type. The including libgen.h confuses matters because the type there is (char*) So only include libgen.h for FreeBSD Signed-off-by: Willem Jan Withagen --- src/common/config.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/common/config.cc b/src/common/config.cc index 28067b0607d..4c66fe77f28 100644 --- a/src/common/config.cc +++ b/src/common/config.cc @@ -35,6 +35,10 @@ #include #include #include +#if defined(__FreeBSD__) +/* FreeBSD/Clang requires basename() whereas Linux preffers the version in */ +#include +#endif /* Don't use standard Ceph logging in this file. * We can't use logging until it's initialized, and a lot of the necessary -- 2.47.3