From 8bf486aaf7a6e2ae2ecc331ba0bdb62cc55d6d49 Mon Sep 17 00:00:00 2001 From: dianlujitao Date: Sun, 8 Sep 2019 16:49:08 +0800 Subject: [PATCH] sm6250-common: bluetooth: Fix undefined PROPERTY_VALUE_MAX * vendor/qcom/opensource/commonsys/bluetooth_ext/system_bt_ext/bta/swb/bta_ag_swb.cc:142:14: error: use of undeclared identifier 'PROPERTY_VALUE_MAX' char value[PROPERTY_VALUE_MAX]; * This reverts commit 0be25326c189ad809f0c3daa04f9961b4dbbd1c8. Change-Id: Iaa9458296d71feacc88f5f04d7f5b99616115f23 --- bluetooth/include/bdroid_buildcfg.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/bluetooth/include/bdroid_buildcfg.h b/bluetooth/include/bdroid_buildcfg.h index 931b0e4..2c71801 100644 --- a/bluetooth/include/bdroid_buildcfg.h +++ b/bluetooth/include/bdroid_buildcfg.h @@ -23,11 +23,17 @@ #ifndef _BDROID_BUILDCFG_H #define _BDROID_BUILDCFG_H -#pragma push_macro("PROPERTY_VALUE_MAX") - -#include +#include #include +#ifdef __cplusplus +extern "C" { +#endif +int property_get(const char *key, char *value, const char *default_value); +#ifdef __cplusplus +} +#endif + #include "osi/include/osi.h" typedef struct { @@ -40,7 +46,7 @@ static const device_t devices[] = { static inline const char *BtmGetDefaultName() { - char product_device[PROPERTY_VALUE_MAX]; + char product_device[92]; property_get("ro.product.device", product_device, ""); for (unsigned int i = 0; i < ARRAY_SIZE(devices); i++) { @@ -65,6 +71,4 @@ static inline const char *BtmGetDefaultName() #define BT_CLEAN_TURN_ON_DISABLED 1 #define AVDT_NUM_SEPS 35 -#pragma pop_macro("PROPERTY_VALUE_MAX") - #endif