$NetBSD: patch-as,v 1.1 2002/02/05 22:23:33 drochner Exp $ --- src/exec/dpexec/remote.c.orig Tue Feb 5 15:19:40 2002 +++ src/exec/dpexec/remote.c Tue Feb 5 15:27:11 2002 @@ -103,14 +103,18 @@ Error ExHostToFQDN( const char host[], char fqdn[MAXHOSTNAMELEN] ) { struct hostent *hp, *hp2; + void *addr; hp = gethostbyname(host); if ( hp == NULL || hp->h_addr_list[0] == NULL ) { DXUIMessage("ERROR", "gethostbyname returned error"); return ERROR; } - hp2 = gethostbyaddr( hp->h_addr_list[0], sizeof(struct in_addr), + addr = malloc(hp->h_length); + memcpy(addr, hp->h_addr_list[0], hp->h_length); + hp2 = gethostbyaddr(addr, hp->h_length, AF_INET ); + free(addr); if ( hp2 == NULL || hp2->h_name == NULL ) { DXUIMessage("ERROR", "gethostbyaddr returned error"); return ERROR;