summaryrefslogtreecommitdiff
path: root/networking/nc.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/nc.c')
-rw-r--r--networking/nc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/networking/nc.c b/networking/nc.c
index b2f590a..feb9c5d 100644
--- a/networking/nc.c
+++ b/networking/nc.c
@@ -103,14 +103,14 @@ int nc_main(int argc, char **argv)
if (lport)
set_nport(lsa, htons(lport));
setsockopt_reuseaddr(sfd);
- xbind(sfd, &lsa->sa, lsa->len);
+ xbind(sfd, &lsa->u.sa, lsa->len);
xlisten(sfd, do_listen); /* can be > 1 */
/* If we didn't specify a port number,
* query and print it after listen() */
if (!lport) {
socklen_t addrlen = lsa->len;
- getsockname(sfd, &lsa->sa, &addrlen);
- lport = get_nport(&lsa->sa);
+ getsockname(sfd, &lsa->u.sa, &addrlen);
+ lport = get_nport(&lsa->u.sa);
fdprintf(2, "%d\n", ntohs(lport));
}
close_on_exec_on(sfd);