diff --git a/src/platform/Linux/BUILD.gn b/src/platform/Linux/BUILD.gn index bfcbcd9be73703..5a66ab0ccc335d 100644 --- a/src/platform/Linux/BUILD.gn +++ b/src/platform/Linux/BUILD.gn @@ -70,28 +70,32 @@ static_library("Linux") { "Logging.cpp", "NetworkCommissioningDriver.h", "NetworkCommissioningEthernetDriver.cpp", - "NetworkCommissioningWiFiDriver.cpp", "PlatformManagerImpl.cpp", "PlatformManagerImpl.h", "PosixConfig.cpp", "PosixConfig.h", "SystemPlatformConfig.h", "SystemTimeSupport.cpp", - "bluez/AdapterIterator.cpp", - "bluez/AdapterIterator.h", - "bluez/ChipDeviceScanner.cpp", - "bluez/ChipDeviceScanner.h", - "bluez/Helper.cpp", - "bluez/Helper.h", - "bluez/MainLoop.cpp", - "bluez/MainLoop.h", - "bluez/Types.h", ] if (chip_enable_openthread) { sources += [ "NetworkCommissioningThreadDriver.cpp" ] } + if (chip_enable_ble) { + sources += [ + "bluez/AdapterIterator.cpp", + "bluez/AdapterIterator.h", + "bluez/ChipDeviceScanner.cpp", + "bluez/ChipDeviceScanner.h", + "bluez/Helper.cpp", + "bluez/Helper.h", + "bluez/MainLoop.cpp", + "bluez/MainLoop.h", + "bluez/Types.h", + ] + } + deps = [ "${chip_root}/src/setup_payload" ] public_deps = [ @@ -135,7 +139,10 @@ static_library("Linux") { } if (chip_enable_wifi) { - sources += [ "GlibTypeDeleter.h" ] + sources += [ + "GlibTypeDeleter.h", + "NetworkCommissioningWiFiDriver.cpp", + ] public_deps += [ "dbus/wpa" ] } diff --git a/src/platform/Linux/NetworkCommissioningEthernetDriver.cpp b/src/platform/Linux/NetworkCommissioningEthernetDriver.cpp index 00c619c3605be3..10d056708a980d 100644 --- a/src/platform/Linux/NetworkCommissioningEthernetDriver.cpp +++ b/src/platform/Linux/NetworkCommissioningEthernetDriver.cpp @@ -34,7 +34,7 @@ NetworkIterator * LinuxEthernetDriver::GetNetworks() { auto ret = new EthernetNetworkIterator(); ConnectivityUtils::GetEthInterfaceName(SafePointerCast(ret->interfaceName), sizeof(ret->interfaceName)); - ret->interfaceNameLen = strnlen(SafePointerCast(ret->interfaceName), sizeof(ret->interfaceName)); + ret->interfaceNameLen = static_cast(strnlen(SafePointerCast(ret->interfaceName), sizeof(ret->interfaceName))); return ret; }