From 0bfb9b2bd780c9e52c93750a09b89e7fe6353f0b Mon Sep 17 00:00:00 2001 From: CW-B-W Date: Thu, 17 Aug 2023 04:04:58 +0800 Subject: [PATCH] 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 ea30f4293b..e787bf5ef2 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 #include +#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