diff --git a/src/polyp/error.c b/src/polyp/error.c index ee9ce51b1..0e3b506f1 100644 --- a/src/polyp/error.c +++ b/src/polyp/error.c @@ -170,7 +170,7 @@ static char *tlsstr; #endif -char* pa_cstrerror(int errnum) { +const char* pa_cstrerror(int errnum) { const char *origbuf; #ifdef HAVE_STRERROR_R diff --git a/src/polyp/error.h b/src/polyp/error.h index 33507bfd4..1d7b2ca64 100644 --- a/src/polyp/error.h +++ b/src/polyp/error.h @@ -37,7 +37,7 @@ const char* pa_strerror(int error); * string to UTF-8. The function is thread safe but the returned string is * only guaranteed to exist until the thread exits or pa_cstrerror() is * called again from the same thread. */ -char* pa_cstrerror(int errnum); +const char* pa_cstrerror(int errnum); PA_C_DECL_END