Documentation cherry-pick: Fix cut-and-paste error
[git/platforms/storm.git] / compat / hstrerror.c
blob069c555da47ea168eea937fcc2d788294bf92ef5
1 #include <string.h>
2 #include <stdio.h>
3 #include <netdb.h>
5 const char *githstrerror(int err)
7 static char buffer[48];
8 switch (err)
10 case HOST_NOT_FOUND:
11 return "Authoritative answer: host not found";
12 case NO_DATA:
13 return "Valid name, no data record of requested type";
14 case NO_RECOVERY:
15 return "Non recoverable errors, FORMERR, REFUSED, NOTIMP";
16 case TRY_AGAIN:
17 return "Non-authoritative \"host not found\", or SERVERFAIL";
19 sprintf(buffer, "Name resolution error %d", err);
20 return buffer;