From 757a71ff3b70b1871b89a827cb11dc9ba398e0bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Wed, 19 Feb 2020 18:39:43 +0100 Subject: [PATCH] Ensure the use of the bind function for the socket. This resolves FTBFS on FreeBSD. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- src/ftplib.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);