summaryrefslogtreecommitdiff
path: root/networking/nc.c
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer2008-01-29 10:33:34 +0000
committerBernhard Reutner-Fischer2008-01-29 10:33:34 +0000
commit8c69afd992d7cc6c2fc7dea59c3c2bd3f3c21f15 (patch)
tree998a337ecd57b737423a3793365519213f97da72 /networking/nc.c
parentc882f341cec8451ee87af6746abb7208272d5b1a (diff)
downloadbusybox-8c69afd992d7cc6c2fc7dea59c3c2bd3f3c21f15.zip
busybox-8c69afd992d7cc6c2fc7dea59c3c2bd3f3c21f15.tar.gz
- be C99 friendly. Anonymous unions are a GNU extension. This change is
size-neutral WRT -std=gnu99 and fixes several compilation errors for strict C99 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);