This is an automated email from the ASF dual-hosted git repository.
andk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
The following commit(s) were added to refs/heads/master by this push:
new 89d6fd6c nimble/transport: Fix undeclared function 'min' warning
89d6fd6c is described below
commit 89d6fd6c474e3273abe33d18794d69968a145366
Author: Guy Mishol <[email protected]>
AuthorDate: Mon May 20 13:55:12 2024 +0300
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 613c9ce1..f1ebbd89 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 <nimble/transport.h>
#include <nimble/transport/hci_ipc.h>
+#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