Hi, running gethostip on amd64 shows, e.g.: # gethostip 128.0.0.1 128.0.0.1 128.0.0.1 FFFFFFFF80000001 The patch below fixes it: --- gethostip.c +++ gethostip.c @@ -120,7 +120,7 @@ if ( output & 4 ) { unsigned long addr = - (((unsigned char *)host->h_addr)[0] << 24UL) + + ((unsigned long) ((unsigned char *)host->h_addr)[0] << 24UL) + (((unsigned char *)host->h_addr)[1] << 16UL) + (((unsigned char *)host->h_addr)[2] << 8UL) + (((unsigned char *)host->h_addr)[3]); Steffen
Hi, running gethostip on amd64 shows, e.g.: # gethostip 128.0.0.1 128.0.0.1 128.0.0.1 FFFFFFFF80000001 The patch below fixes it: --- gethostip.c +++ gethostip.c @@ -120,7 +120,7 @@ if ( output & 4 ) { unsigned long addr = - (((unsigned char *)host->h_addr)[0] << 24UL) + + ((unsigned long) ((unsigned char *)host->h_addr)[0] << 24UL) + (((unsigned char *)host->h_addr)[1] << 16UL) + (((unsigned char *)host->h_addr)[2] << 8UL) + (((unsigned char *)host->h_addr)[3]); Steffen