Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dd390faa authored by Ryan Prichard's avatar Ryan Prichard
Browse files

Undefine NAN before defining it again

After upgrading libc++, math.h happens to be included at the point
where this file tries to define NAN. Redefining a macro to a different
value is an error, but #undef'ing a macro is OK even if the macro isn't
actually defined.

Bug: b/175635923
Test: treehugger
Change-Id: Ie8e3e87189bcd7ed8fccccfc0a79e04a5bfda16b
parent 925071fa
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -122,6 +122,7 @@ std::vector<IWifiChip::ChipConcurrencyCombination> legacyToChipConcurrencyComboL
#define AP IfaceConcurrencyType::AP
#define AP_BRIDGED IfaceConcurrencyType::AP_BRIDGED
#define P2P IfaceConcurrencyType::P2P
#undef NAN  // undefine NAN from math.h
#define NAN IfaceConcurrencyType::NAN_IFACE
static const std::vector<IWifiChip::ChipMode> kChipModesPrimary{
        {kMainModeId, legacyToChipConcurrencyComboList({WIFI_HAL_INTERFACE_COMBINATIONS})},