Ver Fonte

[components][drivers]fix compiler error in serial dm (#8927)

fix compiler error in serial dm
zms123456 há 1 ano atrás
pai
commit
151a96cb88
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      components/drivers/include/drivers/serial_dm.h

+ 2 - 2
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)