projects
/
oweals
/
musl.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
use rt_sigprocmask, not legacy sigprocmask, syscall in pthread exit code
[oweals/musl.git]
/
src
/
network
/
hstrerror.c
1
#define _GNU_SOURCE
2
#include <netdb.h>
3
4
static const char msgs[] =
5
"Host not found\0"
6
"Try again\0"
7
"Non-recoverable error\0"
8
"Address not available\0"
9
"\0Unknown error";
10
11
const char *hstrerror(int ecode)
12
{
13
const char *s;
14
for (s=msgs, ecode--; ecode && *s; ecode--, s++) for (; *s; s++);
15
return *s ? s : s+1;
16
}