sources: Fix ifdefs

We don't want to compare the boolean value of these macros, but the
existence of their definition. None of our Makefile definitions define
an actual value for them, but rely on their presence.

Change-Id: I21688d70acfbfef4d8ca3284fd6db8dbf64b7e6f
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/ethernet_interface.cpp b/ethernet_interface.cpp
index 607e658..2de60e4 100644
--- a/ethernet_interface.cpp
+++ b/ethernet_interface.cpp
@@ -122,7 +122,7 @@
     EthernetInterfaceIntf::linkUp(linkUp());
     EthernetInterfaceIntf::nicEnabled(nicEnabled());
 
-#if NIC_SUPPORTS_ETHTOOL
+#ifdef NIC_SUPPORTS_ETHTOOL
     InterfaceInfo ifInfo = EthernetInterface::getInterfaceInfo();
 
     EthernetInterfaceIntf::autoNeg(std::get<2>(ifInfo));
@@ -348,7 +348,7 @@
     return objectPath;
 }
 
-#if NIC_SUPPORTS_ETHTOOL
+#ifdef NIC_SUPPORTS_ETHTOOL
 /*
   Enable this code if your NIC driver supports the ETHTOOL features.
   Do this by adding the following to your phosphor-network*.bbappend file.
diff --git a/network_manager.cpp b/network_manager.cpp
index 881b767..751d1a1 100644
--- a/network_manager.cpp
+++ b/network_manager.cpp
@@ -210,7 +210,7 @@
     restartTimers();
 }
 
-#if SYNC_MAC_FROM_INVENTORY
+#ifdef SYNC_MAC_FROM_INVENTORY
 void Manager::setFistBootMACOnInterface(
     const std::pair<std::string, std::string>& inventoryEthPair)
 {
diff --git a/network_manager_main.cpp b/network_manager_main.cpp
index 734a48a..38fe673 100644
--- a/network_manager_main.cpp
+++ b/network_manager_main.cpp
@@ -48,7 +48,7 @@
 std::unique_ptr<Timer> refreshObjectTimer = nullptr;
 std::unique_ptr<Timer> restartTimer = nullptr;
 
-#if SYNC_MAC_FROM_INVENTORY
+#ifdef SYNC_MAC_FROM_INVENTORY
 std::unique_ptr<sdbusplus::bus::match::match> EthInterfaceMatch = nullptr;
 std::vector<std::string> first_boot_status;
 
@@ -330,7 +330,7 @@
     // RTNETLINK event handler
     phosphor::network::rtnetlink::Server svr(eventPtr, smartSock);
 
-#if SYNC_MAC_FROM_INVENTORY
+#ifdef SYNC_MAC_FROM_INVENTORY
     std::ifstream in(configFile);
     nlohmann::json configJson;
     in >> configJson;
diff --git a/util.cpp b/util.cpp
index 5e1c92b..34df649 100644
--- a/util.cpp
+++ b/util.cpp
@@ -543,7 +543,7 @@
 
     std::string interfaceName = intfName;
 
-#if SYNC_MAC_FROM_INVENTORY
+#ifdef SYNC_MAC_FROM_INVENTORY
     // load the config JSON from the Read Only Path
     std::ifstream in(configFile);
     nlohmann::json configJson;