diff --git a/include/sensorutils.hpp b/include/sensorutils.hpp
index e404a21..5e88dc4 100644
--- a/include/sensorutils.hpp
+++ b/include/sensorutils.hpp
@@ -76,7 +76,7 @@
         sd_bus_unref(bus);
         return false;
     }
-    sdbusplus::bus::bus dbus(bus);
+    sdbusplus::bus_t dbus(bus);
     auto mapperCall =
         dbus.new_method_call("xyz.openbmc_project.ObjectMapper",
                              "/xyz/openbmc_project/object_mapper",
diff --git a/src/oemcommands.cpp b/src/oemcommands.cpp
index 577f513..6d7829a 100644
--- a/src/oemcommands.cpp
+++ b/src/oemcommands.cpp
@@ -50,7 +50,7 @@
 
 size_t getSelectorPosition();
 static void registerOEMFunctions() __attribute__((constructor));
-sdbusplus::bus::bus dbus(ipmid_get_sd_bus_connection()); // from ipmid/api.h
+sdbusplus::bus_t dbus(ipmid_get_sd_bus_connection()); // from ipmid/api.h
 static constexpr size_t maxFRUStringLength = 0x3F;
 constexpr uint8_t cmdSetSystemGuid = 0xEF;
 
@@ -111,8 +111,7 @@
     return address.find(IPV4_PREFIX) == 0 || address.find(IPV6_PREFIX) == 0;
 }
 
-DbusObjectInfo getIPObject(sdbusplus::bus::bus& bus,
-                           const std::string& interface,
+DbusObjectInfo getIPObject(sdbusplus::bus_t& bus, const std::string& interface,
                            const std::string& serviceRoot,
                            const std::string& match)
 {
@@ -268,7 +267,7 @@
 ipmi_ret_t getNetworkData(uint8_t lan_param, char* data)
 {
     ipmi_ret_t rc = IPMI_CC_OK;
-    sdbusplus::bus::bus bus(ipmid_get_sd_bus_connection());
+    sdbusplus::bus_t bus(ipmid_get_sd_bus_connection());
 
     const std::string ethdevice = "eth0";
 
@@ -373,7 +372,7 @@
         sd_bus_unref(bus);
         return -1;
     }
-    sdbusplus::bus::bus dbus(bus);
+    sdbusplus::bus_t dbus(bus);
     auto mapperCall = dbus.new_method_call("xyz.openbmc_project.ObjectMapper",
                                            "/xyz/openbmc_project/object_mapper",
                                            "xyz.openbmc_project.ObjectMapper",
diff --git a/src/storagecommands.cpp b/src/storagecommands.cpp
index dc6c91b..d79c6d4 100644
--- a/src/storagecommands.cpp
+++ b/src/storagecommands.cpp
@@ -73,7 +73,7 @@
 // collision to verify our dev-id
 boost::container::flat_map<uint8_t, std::pair<uint8_t, uint8_t>> deviceHashes;
 
-static sdbusplus::bus::bus dbus(ipmid_get_sd_bus_connection());
+static sdbusplus::bus_t dbus(ipmid_get_sd_bus_connection());
 
 static bool getSensorMap(std::string sensorConnection, std::string sensorPath,
                          SensorMap& sensorMap)
@@ -134,13 +134,13 @@
 
 bool writeFru()
 {
-    sdbusplus::message::message writeFru = dbus.new_method_call(
+    sdbusplus::message_t writeFru = dbus.new_method_call(
         fruDeviceServiceName, "/xyz/openbmc_project/FruDevice",
         "xyz.openbmc_project.FruDeviceManager", "WriteFru");
     writeFru.append(cacheBus, cacheAddr, fruCache);
     try
     {
-        sdbusplus::message::message writeFruResp = dbus.call(writeFru);
+        sdbusplus::message_t writeFruResp = dbus.call(writeFru);
     }
     catch (const sdbusplus::exception_t&)
     {
@@ -176,13 +176,13 @@
         writeFru();
     }
 
-    sdbusplus::message::message getObjects = dbus.new_method_call(
+    sdbusplus::message_t getObjects = dbus.new_method_call(
         fruDeviceServiceName, "/", "org.freedesktop.DBus.ObjectManager",
         "GetManagedObjects");
     ManagedObjectType frus;
     try
     {
-        sdbusplus::message::message resp = dbus.call(getObjects);
+        sdbusplus::message_t resp = dbus.call(getObjects);
         resp.read(frus);
     }
     catch (const sdbusplus::exception_t&)
@@ -258,7 +258,7 @@
     }
 
     fruCache.clear();
-    sdbusplus::message::message getRawFru = dbus.new_method_call(
+    sdbusplus::message_t getRawFru = dbus.new_method_call(
         fruDeviceServiceName, "/xyz/openbmc_project/FruDevice",
         "xyz.openbmc_project.FruDeviceManager", "GetRawFru");
     cacheBus = deviceFind->second.first;
@@ -266,7 +266,7 @@
     getRawFru.append(cacheBus, cacheAddr);
     try
     {
-        sdbusplus::message::message getRawResp = dbus.call(getRawFru);
+        sdbusplus::message_t getRawResp = dbus.call(getRawFru);
         getRawResp.read(fruCache);
     }
     catch (const sdbusplus::exception_t&)
@@ -446,12 +446,12 @@
 
     ManagedObjectType frus;
 
-    sdbusplus::message::message getObjects = dbus.new_method_call(
+    sdbusplus::message_t getObjects = dbus.new_method_call(
         fruDeviceServiceName, "/", "org.freedesktop.DBus.ObjectManager",
         "GetManagedObjects");
     try
     {
-        sdbusplus::message::message resp = dbus.call(getObjects);
+        sdbusplus::message_t resp = dbus.call(getObjects);
         resp.read(frus);
     }
     catch (const sdbusplus::exception_t&)
