Ensure the use of the bind function for the socket.

This resolves FTBFS on FreeBSD.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/4/head
Slávek Banko 5 years ago
parent 28e2c3f352
commit 757a71ff3b
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -695,7 +695,7 @@ int ftplib::FtpOpenPort(netbuf *nControl, netbuf **nData, int mode, int dir, cha
} }
sin.in.sin_port = 0; sin.in.sin_port = 0;
if (bind(sData, &sin.sa, sizeof(sin)) == -1) if (::bind(sData, &sin.sa, sizeof(sin)) == -1)
{ {
perror("bind"); perror("bind");
close(sData); close(sData);

Loading…
Cancel
Save