diff options
Diffstat (limited to 'networking/pscan.c')
-rw-r--r-- | networking/pscan.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/networking/pscan.c b/networking/pscan.c index d18f8dbd9..830419371 100644 --- a/networking/pscan.c +++ b/networking/pscan.c | |||
@@ -73,14 +73,14 @@ int pscan_main(int argc, char **argv) | |||
73 | 73 | ||
74 | /* The SOCK_STREAM socket type is implemented on the TCP/IP protocol. */ | 74 | /* The SOCK_STREAM socket type is implemented on the TCP/IP protocol. */ |
75 | set_nport(lsap, htons(port)); | 75 | set_nport(lsap, htons(port)); |
76 | s = xsocket(lsap->sa.sa_family, SOCK_STREAM, 0); | 76 | s = xsocket(lsap->u.sa.sa_family, SOCK_STREAM, 0); |
77 | 77 | ||
78 | /* We need unblocking socket so we don't need to wait for ETIMEOUT. */ | 78 | /* We need unblocking socket so we don't need to wait for ETIMEOUT. */ |
79 | /* Nonblocking connect typically "fails" with errno == EINPROGRESS */ | 79 | /* Nonblocking connect typically "fails" with errno == EINPROGRESS */ |
80 | ndelay_on(s); | 80 | ndelay_on(s); |
81 | DMSG("connect to port %u", port); | 81 | DMSG("connect to port %u", port); |
82 | start = MONOTONIC_US(); | 82 | start = MONOTONIC_US(); |
83 | if (connect(s, &lsap->sa, lsap->len) == 0) { | 83 | if (connect(s, &lsap->u.sa, lsap->len) == 0) { |
84 | /* Unlikely, for me even localhost fails :) */ | 84 | /* Unlikely, for me even localhost fails :) */ |
85 | DMSG("connect succeeded"); | 85 | DMSG("connect succeeded"); |
86 | goto open; | 86 | goto open; |