Make nbd-proxy header build in all cases
We very intentionally don't do this "only include header if option is
enabled" thing to make sure that compile issues are seen across all
builds.
Tested: Code compiles. Header changes only.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I749aed62ed6cd73690f3d89d75df65bec77562c2
diff --git a/include/nbd_proxy.hpp b/include/nbd_proxy.hpp
index 4431662..ac3a811 100644
--- a/include/nbd_proxy.hpp
+++ b/include/nbd_proxy.hpp
@@ -302,15 +302,15 @@
}
auto openHandler =
- [&conn](const boost::system::error_code ec,
+ [&conn](const boost::system::error_code ec2,
const dbus::utility::ManagedObjectType& objects) {
const std::string* socketValue = nullptr;
const std::string* endpointValue = nullptr;
const std::string* endpointObjectPath = nullptr;
- if (ec)
+ if (ec2)
{
- BMCWEB_LOG_ERROR << "DBus error: " << ec.message();
+ BMCWEB_LOG_ERROR << "DBus error: " << ec2.message();
conn.close("Failed to create mount point");
return;
}
diff --git a/src/webserver_main.cpp b/src/webserver_main.cpp
index f49b25d..ff0bbd7 100644
--- a/src/webserver_main.cpp
+++ b/src/webserver_main.cpp
@@ -12,6 +12,7 @@
#include <image_upload.hpp>
#include <kvm_websocket.hpp>
#include <login_routes.hpp>
+#include <nbd_proxy.hpp>
#include <obmc_console.hpp>
#include <openbmc_dbus_rest.hpp>
#include <redfish.hpp>
@@ -27,10 +28,6 @@
#include <memory>
#include <string>
-#ifdef BMCWEB_ENABLE_VM_NBDPROXY
-#include <nbd_proxy.hpp>
-#endif
-
constexpr int defaultPort = 18080;
inline void setupSocket(crow::App& app)