aboutsummaryrefslogtreecommitdiff
path: root/networking/nc.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/nc.c')
-rw-r--r--networking/nc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/networking/nc.c b/networking/nc.c
index 2f8a36bee..5fd9242cc 100644
--- a/networking/nc.c
+++ b/networking/nc.c
@@ -85,8 +85,7 @@ int nc_main(int argc, char **argv)
85 if (!cfd) { 85 if (!cfd) {
86 sfd = xsocket(AF_INET, SOCK_STREAM, 0); 86 sfd = xsocket(AF_INET, SOCK_STREAM, 0);
87 fcntl(sfd, F_SETFD, FD_CLOEXEC); 87 fcntl(sfd, F_SETFD, FD_CLOEXEC);
88 opt = 1; 88 setsockopt_reuseaddr(sfd);
89 setsockopt(sfd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt));
90 address.sin_family = AF_INET; 89 address.sin_family = AF_INET;
91 90
92 // Set local port. 91 // Set local port.