fix inconsistent signature of __libc_start_main
[musl] / src / network / gai_strerror.c
index 0bf3e37..9596580 100644 (file)
@@ -1,4 +1,5 @@
 #include <netdb.h>
+#include "locale_impl.h"
 
 static const char msgs[] =
        "Invalid flags\0"
@@ -19,5 +20,6 @@ const char *gai_strerror(int ecode)
 {
        const char *s;
        for (s=msgs, ecode++; ecode && *s; ecode++, s++) for (; *s; s++);
-       return *s ? s : s+1;
+       if (!*s) s++;
+       return LCTRANS_CUR(s);
 }