Hi tech@, The following patch modify `local_listen' declaration to conform to `getaddrinfo', thanks!
Index: netcat.c =================================================================== RCS file: /cvs/src/usr.bin/nc/netcat.c,v retrieving revision 1.193 diff -u -p -r1.193 netcat.c --- netcat.c 6 Sep 2018 13:23:02 -0000 1.193 +++ netcat.c 7 Sep 2018 09:37:02 -0000 @@ -122,7 +122,7 @@ void atelnet(int, unsigned char *, unsig int strtoport(char *portstr, int udp); void build_ports(char *); void help(void) __attribute__((noreturn)); -int local_listen(char *, char *, struct addrinfo); +int local_listen(const char *, const char *, struct addrinfo); void readwrite(int, struct tls *); void fdpass(int nfd) __attribute__((noreturn)); int remote_connect(const char *, const char *, struct addrinfo); @@ -994,7 +994,7 @@ timeout_connect(int s, const struct sock * address. Returns -1 on failure. */ int -local_listen(char *host, char *port, struct addrinfo hints) +local_listen(const char *host, const char *port, struct addrinfo hints) { struct addrinfo *res, *res0; int s = -1, ret, x = 1, save_errno; -- Best Regards Nan Xiao