summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2020-02-19 18:39:43 +0100
committerSlávek Banko <slavek.banko@axis.cz>2020-02-19 18:39:56 +0100
commit7e4db341b8c324cf56eb4b9fd64d043ffa59e7ab (patch)
tree0444eaf695b33f60a8bc28866b1be046a4836a2d
parent578a0c812f8a8b22b37f275354d722bc652e722c (diff)
downloadkasablanca-7e4db341b8c324cf56eb4b9fd64d043ffa59e7ab.tar.gz
kasablanca-7e4db341b8c324cf56eb4b9fd64d043ffa59e7ab.zip
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> (cherry picked from commit 757a71ff3b70b1871b89a827cb11dc9ba398e0bf)
-rw-r--r--src/ftplib.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ftplib.cpp b/src/ftplib.cpp
index fb53364..94012ba 100644
--- a/src/ftplib.cpp
+++ b/src/ftplib.cpp
@@ -695,7 +695,7 @@ int ftplib::FtpOpenPort(netbuf *nControl, netbuf **nData, int mode, int dir, cha
}
sin.in.sin_port = 0;
- if (bind(sData, &sin.sa, sizeof(sin)) == -1)
+ if (::bind(sData, &sin.sa, sizeof(sin)) == -1)
{
perror("bind");
close(sData);