From 4dcd87fbef1b088713121dc064491efa8c8cab1c Mon Sep 17 00:00:00 2001 From: Ryan Prichard Date: Wed, 6 Sep 2023 18:41:45 -0700 Subject: [PATCH] [RESTRICT AUTOMERGE] 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 Merged-In: Ie8e3e87189bcd7ed8fccccfc0a79e04a5bfda16b --- wifi/1.6/default/wifi_feature_flags.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/wifi/1.6/default/wifi_feature_flags.cpp b/wifi/1.6/default/wifi_feature_flags.cpp index e80a3cdcb6..ff23e7cc91 100644 --- a/wifi/1.6/default/wifi_feature_flags.cpp +++ b/wifi/1.6/default/wifi_feature_flags.cpp @@ -136,6 +136,7 @@ struct ChipConcurrencyCombination #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 static const std::vector kChipModesPrimary{ {kMainModeId, ChipConcurrencyCombination::make_vec({WIFI_HAL_INTERFACE_COMBINATIONS})},