inet_aton -> inet_pton

This commit is contained in:
Jan Wolff 2021-10-04 19:14:58 +02:00
parent 16399fab9e
commit f6b094c216

View file

@ -28,7 +28,7 @@ int bcast_wakeup(const char* macAddr, const char* broadcast, in_port_t port)
sizeof(opt_broadcast)); sizeof(opt_broadcast));
struct in_addr ip; struct in_addr ip;
if (!inet_aton(broadcast, &ip)) { if (!inet_pton(AF_INET, broadcast, &ip)) {
fputs("could not parse broadcast IP address", stderr); fputs("could not parse broadcast IP address", stderr);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }