]> granicus.if.org Git - check/commitdiff
lib/strsignal.c: strsignal() should be not be declared const
authorAnthony G. Basile <blueness@gentoo.org>
Mon, 21 Mar 2016 12:53:31 +0000 (08:53 -0400)
committerAnthony G. Basile <blueness@gentoo.org>
Mon, 21 Mar 2016 13:01:36 +0000 (09:01 -0400)
POSIX requires strsignal() to return a pointer to a char, not a pointer
to a const char. [1]  On uClibc, and possibly other libcs, this causes
problems with the correct declaration in string.h.

[1] man 3 strsignal

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
lib/libcompat.h
lib/strsignal.c

index b20ffa6e6a796218d688f92e4b311d2b58e29dcf..0aee471a1084c6d14d0c748667984404d9994285 100644 (file)
@@ -133,7 +133,7 @@ CK_DLL_EXP char *strdup(const char *str);
 #endif /* !HAVE_DECL_STRDUP && HAVE__STRDUP */
 
 #if !HAVE_DECL_STRSIGNAL
-CK_DLL_EXP const char *strsignal(int sig);
+CK_DLL_EXP char *strsignal(int sig);
 #endif /* !HAVE_DECL_STRSIGNAL */
 
 /*
index 2239d27d2e66ef92d362952ab1890ae6d5ef177f..012e64d165485934f4eba51c895f6505ea492096 100644 (file)
@@ -20,7 +20,7 @@
 
 #include "libcompat.h"
 
-const char *strsignal(int sig)
+char *strsignal(int sig)
 {
     static char signame[40];