Added gai_strerror
This commit is contained in:
parent
6eb23d3fbd
commit
e9a476cfe2
@ -72,6 +72,7 @@ extern "C" {
|
||||
|
||||
void freeaddrinfo(struct addrinfo *ai);
|
||||
|
||||
const char *gai_strerror(int ecode);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
18
libctru/source/services/soc/soc_gai_strerror.c
Normal file
18
libctru/source/services/soc/soc_gai_strerror.c
Normal file
@ -0,0 +1,18 @@
|
||||
#include <netdb.h>
|
||||
|
||||
const char *gai_strerror(int ecode)
|
||||
{
|
||||
switch(ecode)
|
||||
{
|
||||
case EAI_FAMILY :
|
||||
return "ai_family not supported";
|
||||
case EAI_MEMORY :
|
||||
return "Memory allocation failure";
|
||||
case EAI_NONAME :
|
||||
return "Name or service not known";
|
||||
case EAI_SOCKTYPE :
|
||||
return "ai_socktype not supported";
|
||||
default:
|
||||
return "Unknown error";
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user