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 <wjw@digiware.nl>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
+#if defined(__FreeBSD__)
+/* FreeBSD/Clang requires basename() whereas Linux preffers the version in <string.h> */
+#include <libgen.h>
+#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