Replace last uses of bcopy() with memcpy()

memcpy() / memmove() are standard everywhere, this lets us remove the configure script checking around bcopy()
which helps building on Haiku OS.
This commit is contained in:
Kevin Easton
2018-11-11 01:07:31 +11:00
parent d897a3b753
commit b5afd1d596
5 changed files with 22 additions and 27 deletions

View File

@@ -322,7 +322,7 @@ int handle_socks(int fd, struct sockaddr_in addr, char *host, int portnum)
bitchsay("Unable to resolve SOCKS proxy host address: %s", host);
return -1;
}
bcopy(hp->h_addr, (char *)&proxy.sin_addr, hp->h_length);
memcpy(&proxy.sin_addr, hp->h_addr, hp->h_length);
proxy.sin_family = AF_INET;
proxy.sin_port = htons(portnum);
alarm(get_int_var(CONNECT_TIMEOUT_VAR));
@@ -600,8 +600,7 @@ int BX_connect_by_number(char *hostn, unsigned short *portnum, int service, int
if ((hp = gethostbyname(hostn)) != NULL)
{
memset(&server, 0, sizeof(server));
bcopy(hp->h_addr, (char *) &server.sf_addr,
hp->h_length);
memcpy(&server.sf_addr, hp->h_addr, hp->h_length);
server.sf_family = hp->h_addrtype;
}
else