You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ja...@apache.org on 2023/09/20 06:58:03 UTC
[mynewt-nimble] branch master updated: transport/hci_h4: fix compilation error
This is an automated email from the ASF dual-hosted git repository.
janc 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 0bfb9b2b transport/hci_h4: fix compilation error
0bfb9b2b is described below
commit 0bfb9b2bd780c9e52c93750a09b89e7fe6353f0b
Author: CW-B-W <cw...@gmail.com>
AuthorDate: Thu Aug 17 04:04:58 2023 +0800
transport/hci_h4: fix compilation error
min() was not defined
---
nimble/transport/common/hci_h4/src/hci_h4.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/nimble/transport/common/hci_h4/src/hci_h4.c b/nimble/transport/common/hci_h4/src/hci_h4.c
index ea30f429..e787bf5e 100644
--- a/nimble/transport/common/hci_h4/src/hci_h4.c
+++ b/nimble/transport/common/hci_h4/src/hci_h4.c
@@ -27,6 +27,14 @@
#include <nimble/transport.h>
#include <nimble/transport/hci_h4.h>
+#ifndef min
+#define min(a, b) ((a) < (b) ? (a) : (b))
+#endif
+
+#ifndef max
+#define max(a, b) ((a) > (b) ? (a) : (b))
+#endif
+
#define HCI_H4_SM_W4_PKT_TYPE 0
#define HCI_H4_SM_W4_HEADER 1
#define HCI_H4_SM_W4_PAYLOAD 2