diff --git a/dap-sdk/core/include/dap_strfuncs.h b/dap-sdk/core/include/dap_strfuncs.h index ea2f6c20bc7b6566b4158121402b3ea414c9a352..c581294cb9df00d18df510e4425c3e4f8787414e 100755 --- a/dap-sdk/core/include/dap_strfuncs.h +++ b/dap-sdk/core/include/dap_strfuncs.h @@ -108,7 +108,7 @@ char *dap_itoa128(char *a_str, int128_t a_value, int a_base); #ifdef HAVE_STRNDUP #define strndup(s, l) _strndup(s, l) #endif -char *_strndup(char *str, unsigned long len); +char *_strndup(const char *str, unsigned long len); #endif #define DAP_USEC_PER_SEC 1000000 diff --git a/dap-sdk/core/src/dap_strfuncs.c b/dap-sdk/core/src/dap_strfuncs.c index 99180b36fc207d2a3d345a69d344d711815dc6e1..2685947f96e330bdc41bb865cfac7434e6e2d326 100755 --- a/dap-sdk/core/src/dap_strfuncs.c +++ b/dap-sdk/core/src/dap_strfuncs.c @@ -855,7 +855,7 @@ char *strptime( char *buff, const char *fmt, struct tm *tm ) { return buff + len; } -char *_strndup(char *str, unsigned long len) { +char *_strndup(const char *str, unsigned long len) { char *buf = (char*)memchr(str, '\0', len); if (buf) len = buf - str;