diff options
Diffstat (limited to 'mdk-stage1/dietlibc/libcruft')
-rw-r--r-- | mdk-stage1/dietlibc/libcruft/dnscruft2.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mdk-stage1/dietlibc/libcruft/dnscruft2.c b/mdk-stage1/dietlibc/libcruft/dnscruft2.c index b9cbaa743..539c6c1c7 100644 --- a/mdk-stage1/dietlibc/libcruft/dnscruft2.c +++ b/mdk-stage1/dietlibc/libcruft/dnscruft2.c @@ -43,12 +43,14 @@ int __dns_gethostbyx_r(const char* name, struct hostent* result, int size; if (lookfor==1) { - result->h_aliases=(char**)(buf+8*4); + /* FIXME: what does this magic constant mean? */ + result->h_aliases=(char**)(buf+2*sizeof(char*)*4); result->h_addrtype=AF_INET; result->h_length=4; result->h_addr_list=(char**)buf; } else { - result->h_aliases=(char**)(buf+8*16); + /* FIXME: what does this magic constant mean? */ + result->h_aliases=(char**)(buf+2*sizeof(char*)*16); result->h_addrtype=AF_INET6; result->h_length=16; result->h_addr_list=(char**)buf; |