From 28e58c672ade42149d883de67d071e93d9f437f1 Mon Sep 17 00:00:00 2001
From: Dave Cottlehuber <dch@skunkwerks.at>
Date: Tue, 7 Apr 2020 19:28:18 +0000
Subject: [PATCH] fdbmonitor: ifdef config path location

---
 CMakeLists.txt            | 4 ++++
 fdbmonitor/fdbmonitor.cpp | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3578ab51f4..00bdde8e1e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -146,6 +146,10 @@ set(SEED "0x${SEED_}" CACHE STRING "Random seed for testing")
 # components
 ################################################################################
 
+if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
+  include_directories(/usr/local/include)
+endif()
+
 include(CompileBoost)
 add_subdirectory(flow)
 add_subdirectory(fdbrpc)
diff --git a/fdbmonitor/fdbmonitor.cpp b/fdbmonitor/fdbmonitor.cpp
index a0d1be31f0..25f33d859c 100644
--- a/fdbmonitor/fdbmonitor.cpp
+++ b/fdbmonitor/fdbmonitor.cpp
@@ -1176,7 +1176,11 @@ int main(int argc, char** argv) {
 	// testPathOps(); return -1;
 
 	std::string lockfile = "/var/run/fdbmonitor.pid";
+#ifdef __FreeBSD__
+	std::string _confpath = "/usr/local/etc/foundationdb/foundationdb.conf";
+#else
 	std::string _confpath = "/etc/foundationdb/foundationdb.conf";
+#endif
 
 	std::vector<const char *> additional_watch_paths;