diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2008-01-29 10:33:34 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2008-01-29 10:33:34 +0000 |
commit | 8c69afd992d7cc6c2fc7dea59c3c2bd3f3c21f15 (patch) | |
tree | 998a337ecd57b737423a3793365519213f97da72 /networking/nc.c | |
parent | c882f341cec8451ee87af6746abb7208272d5b1a (diff) | |
download | busybox-w32-8c69afd992d7cc6c2fc7dea59c3c2bd3f3c21f15.tar.gz busybox-w32-8c69afd992d7cc6c2fc7dea59c3c2bd3f3c21f15.tar.bz2 busybox-w32-8c69afd992d7cc6c2fc7dea59c3c2bd3f3c21f15.zip |
- 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.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/networking/nc.c b/networking/nc.c index b2f590adf..feb9c5db6 100644 --- a/networking/nc.c +++ b/networking/nc.c | |||
@@ -103,14 +103,14 @@ int nc_main(int argc, char **argv) | |||
103 | if (lport) | 103 | if (lport) |
104 | set_nport(lsa, htons(lport)); | 104 | set_nport(lsa, htons(lport)); |
105 | setsockopt_reuseaddr(sfd); | 105 | setsockopt_reuseaddr(sfd); |
106 | xbind(sfd, &lsa->sa, lsa->len); | 106 | xbind(sfd, &lsa->u.sa, lsa->len); |
107 | xlisten(sfd, do_listen); /* can be > 1 */ | 107 | xlisten(sfd, do_listen); /* can be > 1 */ |
108 | /* If we didn't specify a port number, | 108 | /* If we didn't specify a port number, |
109 | * query and print it after listen() */ | 109 | * query and print it after listen() */ |
110 | if (!lport) { | 110 | if (!lport) { |
111 | socklen_t addrlen = lsa->len; | 111 | socklen_t addrlen = lsa->len; |
112 | getsockname(sfd, &lsa->sa, &addrlen); | 112 | getsockname(sfd, &lsa->u.sa, &addrlen); |
113 | lport = get_nport(&lsa->sa); | 113 | lport = get_nport(&lsa->u.sa); |
114 | fdprintf(2, "%d\n", ntohs(lport)); | 114 | fdprintf(2, "%d\n", ntohs(lport)); |
115 | } | 115 | } |
116 | close_on_exec_on(sfd); | 116 | close_on_exec_on(sfd); |