summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzms123456 <[email protected]>2024-05-11 11:16:26 +0800
committerGitHub <[email protected]>2024-05-11 11:16:26 +0800
commit151a96cb88328c46133971cc9deef24f6ddfeede (patch)
tree0a5a1ffe52d854b44ead723c4f2c4cbf072c75de
parentb3277fa70479bf4feb16d4938f7aa5816135d6fa (diff)
[components][drivers]fix compiler error in serial dm (#8927)
fix compiler error in serial dm
-rw-r--r--components/drivers/include/drivers/serial_dm.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/drivers/include/drivers/serial_dm.h b/components/drivers/include/drivers/serial_dm.h
index 20792fc9eb..9c47e921cb 100644
--- a/components/drivers/include/drivers/serial_dm.h
+++ b/components/drivers/include/drivers/serial_dm.h
@@ -13,7 +13,7 @@
#include <rtthread.h>
#include <rtdevice.h>
-#include <string.h>
+#include <posix/string.h>
int serial_dev_set_name(struct rt_serial_device *sdev);
@@ -22,7 +22,7 @@ struct serial_configure serial_cfg_from_args(char *str);
#define serial_for_each_args(arg, args) \
for (char *context = (arg = (typeof(arg))args, (void *)RT_NULL), \
- *context_end = rt_strchrnul((char *)args, ' '); \
+ *context_end = strchrnul((char *)args, ' '); \
(arg = strtok_r(arg, ",", &context)) && arg < context_end; \
arg = RT_NULL)