blob: 10600ee024c6302281569fd8a4d89fc09ec8dabb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
--- fdbrpc/Platform.cpp.orig 2019-01-09 22:28:32 UTC
+++ fdbrpc/Platform.cpp
@@ -87,7 +87,7 @@ int eraseDirectoryRecursive(std::string const& dir) {
__eraseDirectoryRecurseiveCount = 0;
#ifdef _WIN32
system( ("rd /s /q \"" + dir + "\"").c_str() );
-#elif defined(__linux__) || defined(__APPLE__)
+#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)
int error =
nftw(dir.c_str(),
[](const char *fpath, const struct stat *sb, int typeflag, struct FTW *ftwbuf) -> int {
@@ -123,8 +123,8 @@ std::string getDefaultConfigPath() {
return _filepath + "\\foundationdb";
#elif defined(__linux__)
return "/etc/foundationdb";
-#elif defined(__APPLE__)
- return "/usr/local/etc/foundationdb";
+#elif defined(__APPLE__) || defined(__FreeBSD__)
+ return CONFDIR;
#else
#error Port me!
#endif
|