From 1d62bea80ab59ccb055276b0edd3e967d40e8aa8 Mon Sep 17 00:00:00 2001 From: Rahul Tank Date: Mon, 28 Aug 2023 09:47:35 +0530 Subject: [PATCH] fix(nimble): Removed global min/max definition causing problems with other libraries --- components/bt/host/nimble/nimble | 2 +- examples/bluetooth/nimble/blemesh/main/app_mesh.c | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/components/bt/host/nimble/nimble b/components/bt/host/nimble/nimble index 8dda9024c9..6669d8b418 160000 --- a/components/bt/host/nimble/nimble +++ b/components/bt/host/nimble/nimble @@ -1 +1 @@ -Subproject commit 8dda9024c9d8ee5fb79e13f89210ce5e27ff8de4 +Subproject commit 6669d8b418c7e483e1f750d354e462082ad695f9 diff --git a/examples/bluetooth/nimble/blemesh/main/app_mesh.c b/examples/bluetooth/nimble/blemesh/main/app_mesh.c index f033e6004c..4a403c6e20 100644 --- a/examples/bluetooth/nimble/blemesh/main/app_mesh.c +++ b/examples/bluetooth/nimble/blemesh/main/app_mesh.c @@ -44,8 +44,15 @@ static int recent_test_id = STANDARD_TEST_ID; #define FAULT_ARR_SIZE 2 -static bool has_reg_fault = true; +#ifndef min +#define min(a, b) ((a) < (b) ? (a) : (b)) +#endif +#ifndef max +#define max(a, b) ((a) > (b) ? (a) : (b)) +#endif + +static bool has_reg_fault = true; static struct bt_mesh_cfg_srv cfg_srv = { .relay = BT_MESH_RELAY_DISABLED,