From: Willem Jan Withagen Date: Wed, 24 Feb 2016 23:39:27 +0000 (+0100) Subject: Clang;common/config.cc basename() requires libgen.h includes X-Git-Tag: v11.0.0~538^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c1943878d3345bd8f9bd598541c48376531e2344;p=ceph.git 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 --- 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