projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix x32 unistd macros to report as ILP32 not LP64
[musl]
/
src
/
network
/
hstrerror.c
diff --git
a/src/network/hstrerror.c
b/src/network/hstrerror.c
index
b7a6ab6
..
a4d001c
100644
(file)
--- a/
src/network/hstrerror.c
+++ b/
src/network/hstrerror.c
@@
-1,5
+1,6
@@
#define _GNU_SOURCE
#include <netdb.h>
#define _GNU_SOURCE
#include <netdb.h>
+#include "locale_impl.h"
static const char msgs[] =
"Host not found\0"
static const char msgs[] =
"Host not found\0"
@@
-12,5
+13,6
@@
const char *hstrerror(int ecode)
{
const char *s;
for (s=msgs, ecode--; ecode && *s; ecode--, s++) for (; *s; s++);
{
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);
}
}