From 501d72a011c379a57c773574ce6ea3d0112cae6e Mon Sep 17 00:00:00 2001 From: Guy Mishol Date: Mon, 20 May 2024 13:55:12 +0300 Subject: [PATCH] nimble/transport: Fix undeclared function 'min' warning Fix build warning generated with llvm based compilers on a call to undeclared function 'min'. --- nimble/transport/common/hci_ipc/src/hci_ipc.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nimble/transport/common/hci_ipc/src/hci_ipc.c b/nimble/transport/common/hci_ipc/src/hci_ipc.c index 613c9ce153..f1ebbd8953 100644 --- a/nimble/transport/common/hci_ipc/src/hci_ipc.c +++ b/nimble/transport/common/hci_ipc/src/hci_ipc.c @@ -26,6 +26,14 @@ #include #include +#ifndef min +#define min(a, b) ((a) < (b) ? (a) : (b)) +#endif + +#ifndef max +#define max(a, b) ((a) > (b) ? (a) : (b)) +#endif + volatile struct hci_ipc_shm *g_ipc_shm; static void