about summary refs log tree commit diff
path: root/src/network/gai_strerror.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/gai_strerror.c')
-rw-r--r--src/network/gai_strerror.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/network/gai_strerror.c b/src/network/gai_strerror.c
index 0bf3e379..9596580e 100644
--- a/src/network/gai_strerror.c
+++ b/src/network/gai_strerror.c
@@ -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);
 }