sync with OpenBSD -current

This commit is contained in:
purplerain 2024-08-14 02:30:10 +00:00
parent 302c0be22f
commit ee61daa776
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
105 changed files with 1609 additions and 484 deletions

View file

@ -1,4 +1,4 @@
/* $OpenBSD: inet.c,v 1.182 2024/04/17 20:48:51 bluhm Exp $ */
/* $OpenBSD: inet.c,v 1.183 2024/08/12 06:22:36 florian Exp $ */
/* $NetBSD: inet.c,v 1.14 1995/10/03 21:42:37 thorpej Exp $ */
/*
@ -813,7 +813,6 @@ static char *
getrpcportnam(in_port_t port, int proto)
{
struct sockaddr_in server_addr;
struct hostent *hp;
static struct pmaplist *head;
int socket = RPC_ANYSOCK;
struct timeval minutetimeout;
@ -828,11 +827,7 @@ getrpcportnam(in_port_t port, int proto)
first = 1;
memset(&server_addr, 0, sizeof server_addr);
server_addr.sin_family = AF_INET;
if ((hp = gethostbyname("localhost")) != NULL)
memmove((caddr_t)&server_addr.sin_addr, hp->h_addr,
hp->h_length);
else
(void) inet_aton("0.0.0.0", &server_addr.sin_addr);
(void) inet_pton(AF_INET, "127.0.0.1", &server_addr.sin_addr);
minutetimeout.tv_sec = 60;
minutetimeout.tv_usec = 0;