LibC: Add h_errno and stub out getservbyname()

This commit is contained in:
Andreas Kling 2020-02-20 06:58:16 +01:00
parent cf4da485e6
commit c3b09c7242
Notes: sideshowbarker 2024-07-19 09:12:30 +09:00
2 changed files with 16 additions and 0 deletions

View File

@ -37,6 +37,8 @@
extern "C" {
int h_errno;
static hostent __gethostbyname_buffer;
static char __gethostbyname_name_buffer[512];
static in_addr_t __gethostbyname_address;
@ -196,4 +198,11 @@ hostent* gethostbyaddr(const void* addr, socklen_t addr_size, int type)
return &__gethostbyaddr_buffer;
}
struct servent* getservbyname(const char* name, const char* protocol)
{
dbg() << "FIXME: getservbyname(\"" << name << "\", \"" << protocol << "\")";
ASSERT_NOT_REACHED();
}
}

View File

@ -52,4 +52,11 @@ struct servent {
struct servent* getservbyname(const char* name, const char* protocol);
extern int h_errno;
#define HOST_NOT_FOUND 101
#define NO_DATA 102
#define NO_RECOVERY 103
#define TRY_AGAIN 104
__END_DECLS