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 6a5a16c7c nimble/host: Rename STRINGIFY to aviod compile error
6a5a16c7c is described below

commit 6a5a16c7c0fab0fe7e95154493ff1fe9f0824fe3
Author: v-tangmeng <v-tangm...@xiaomi.com>
AuthorDate: Wed Sep 24 13:38:41 2025 +0800

    nimble/host: Rename STRINGIFY to aviod compile error
    
    If `STRINGIFY` is also defined in the kernel or other third-party
    libraries, it will cause the following error:
    
    ble_gatts_lcl.c:95: error:"STRINGIFY" redefined [-Werror]
       95 | #define STRINGIFY(X) #X
    
    In order to prevent this situation, rename to `NIMBLE_STRINGIFY`.
    
    Signed-off-by: v-tangmeng <v-tangm...@xiaomi.com>
---
 nimble/host/src/ble_gatts_lcl.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/nimble/host/src/ble_gatts_lcl.c b/nimble/host/src/ble_gatts_lcl.c
index f824e9000..8d829ae51 100644
--- a/nimble/host/src/ble_gatts_lcl.c
+++ b/nimble/host/src/ble_gatts_lcl.c
@@ -91,10 +91,9 @@ ble_gatts_flags_to_str(uint16_t flags, char *buf,
     return buf;
 }
 
-
-#define STRINGIFY(X) #X
-#define FIELD_NAME_LEN STRINGIFY(12)
-#define FIELD_INDENT STRINGIFY(2)
+#define NIMBLE_STRINGIFY(X) #X
+#define FIELD_NAME_LEN      NIMBLE_STRINGIFY(12)
+#define FIELD_INDENT        NIMBLE_STRINGIFY(2)
 
 static void
 ble_gatt_show_local_chr(const struct ble_gatt_svc_def *svc,

Reply via email to