From d006905c88ce9b6eaad53bf5546278d24f80081a Mon Sep 17 00:00:00 2001 From: mazhiyuan Date: Wed, 13 Oct 2021 16:23:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9size=5Ft=E4=B8=BArt=5Fsize=5F?= =?UTF-8?q?t?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/rtthread.h | 2 +- src/kservice.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/rtthread.h b/include/rtthread.h index cee58e402b..83be7d1ebc 100644 --- a/include/rtthread.h +++ b/include/rtthread.h @@ -596,7 +596,7 @@ rt_size_t rt_strnlen(const char *s, rt_ubase_t maxlen); #ifdef __ARMCC_VERSION /* MDK doesn't have these APIs */ char* strdup(const char* str); -size_t strnlen(const char *s, size_t maxlen); +rt_size_t strnlen(const char *s, rt_size_t maxlen); #endif /* __ARMCC_VERSION */ void rt_show_version(void); diff --git a/src/kservice.c b/src/kservice.c index cc1dc6e22c..852795309d 100644 --- a/src/kservice.c +++ b/src/kservice.c @@ -545,7 +545,7 @@ rt_size_t rt_strnlen(const char *s, rt_ubase_t maxlen) } RTM_EXPORT(rt_strnlen); #ifdef __ARMCC_VERSION -size_t strnlen(const char *s, size_t maxlen) __attribute__((alias("rt_strnlen"))); +rt_size_t strnlen(const char *s, rt_size_t maxlen) __attribute__((alias("rt_strnlen"))); #endif /* __ARMCC_VERSION */ #endif /* !defined(RT_KSERVICE_USING_STDLIB) || defined(__ARMCC_VERSION) */