firmware_handler: add fake sdbusplus if not found
If HAVE_SDBUSPLUS is set, use the real header, otherwise define a fake
sdbusplus/bus/bus object.
Change-Id: I70e343dd726c2eaf0f03c0ab96898686161ade27
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/firmware_handler.hpp b/firmware_handler.hpp
index 728fdca..212e570 100644
--- a/firmware_handler.hpp
+++ b/firmware_handler.hpp
@@ -1,5 +1,7 @@
#pragma once
+#include "config.h"
+
#include "data_handler.hpp"
#include "image_handler.hpp"
@@ -7,7 +9,19 @@
#include <cstdint>
#include <map>
#include <memory>
+#if HAVE_SDBUSPLUS
#include <sdbusplus/bus.hpp>
+#else
+namespace sdbusplus
+{
+namespace bus
+{
+class bus
+{
+};
+} // namespace bus
+} // namespace sdbusplus
+#endif
#include <string>
#include <vector>