Skip to content

Commit 6a5a16c

Browse files
TangMeng12sjanc
authored andcommitted
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-tangmeng@xiaomi.com>
1 parent 1701428 commit 6a5a16c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

nimble/host/src/ble_gatts_lcl.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,9 @@ ble_gatts_flags_to_str(uint16_t flags, char *buf,
9191
return buf;
9292
}
9393

94-
95-
#define STRINGIFY(X) #X
96-
#define FIELD_NAME_LEN STRINGIFY(12)
97-
#define FIELD_INDENT STRINGIFY(2)
94+
#define NIMBLE_STRINGIFY(X) #X
95+
#define FIELD_NAME_LEN NIMBLE_STRINGIFY(12)
96+
#define FIELD_INDENT NIMBLE_STRINGIFY(2)
9897

9998
static void
10099
ble_gatt_show_local_chr(const struct ble_gatt_svc_def *svc,

0 commit comments

Comments
 (0)