network_manager: JSON is only used for SYNC_MAC
We don't include the header when this feature isn't enabled
Change-Id: I99f0ad5d40378bf381c878bce4539e6790f76335
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/network_manager_main.cpp b/network_manager_main.cpp
index 38fe673..b0d6d2e 100644
--- a/network_manager_main.cpp
+++ b/network_manager_main.cpp
@@ -11,7 +11,9 @@
#include <fstream>
#include <functional>
#include <memory>
+#ifdef SYNC_MAC_FROM_INVENTORY
#include <nlohmann/json.hpp>
+#endif
#include <phosphor-logging/elog-errors.hpp>
#include <phosphor-logging/log.hpp>
#include <sdbusplus/bus.hpp>
diff --git a/util.cpp b/util.cpp
index 34df649..5c5e427 100644
--- a/util.cpp
+++ b/util.cpp
@@ -15,7 +15,9 @@
#include <filesystem>
#include <fstream>
#include <list>
+#ifdef SYNC_MAC_FROM_INVENTORY
#include <nlohmann/json.hpp>
+#endif
#include <phosphor-logging/elog-errors.hpp>
#include <phosphor-logging/log.hpp>
#include <stdexcept>