From 133b2e45e337d4a29a5d39696af4edf2576ccd07 Mon Sep 17 00:00:00 2001 From: Rahul Tank Date: Fri, 16 Dec 2022 10:22:51 +0530 Subject: [PATCH] Nimble: Removes global min/max definition causing problems with other libraries --- components/bt/host/nimble/nimble | 2 +- examples/bluetooth/nimble/blemesh/main/app_mesh.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/components/bt/host/nimble/nimble b/components/bt/host/nimble/nimble index 9a355b2b59..56ff5b8333 160000 --- a/components/bt/host/nimble/nimble +++ b/components/bt/host/nimble/nimble @@ -1 +1 @@ -Subproject commit 9a355b2b597a66868aed37e1ebccb0c274aaa252 +Subproject commit 56ff5b83337697895997a39bf6593255cdc37268 diff --git a/examples/bluetooth/nimble/blemesh/main/app_mesh.c b/examples/bluetooth/nimble/blemesh/main/app_mesh.c index 9c3e5af0ee..7ffe5f411f 100644 --- a/examples/bluetooth/nimble/blemesh/main/app_mesh.c +++ b/examples/bluetooth/nimble/blemesh/main/app_mesh.c @@ -43,6 +43,14 @@ static int recent_test_id = STANDARD_TEST_ID; #define FAULT_ARR_SIZE 2 +#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 int