diff --git a/source/shared_lib/sources/feathery_ftp/ftpCmds.c b/source/shared_lib/sources/feathery_ftp/ftpCmds.c index 9bff3211..9f975041 100755 --- a/source/shared_lib/sources/feathery_ftp/ftpCmds.c +++ b/source/shared_lib/sources/feathery_ftp/ftpCmds.c @@ -667,6 +667,7 @@ LOCAL int ftpCmdPasv(int sessionId, const char* args, int len) uint32_t ip; char str[50]; socket_t s; + uint32_t remoteFTPServerIp; if(ftpGetSession(sessionId)->passiveDataSocket >= 0) { @@ -688,7 +689,7 @@ LOCAL int ftpCmdPasv(int sessionId, const char* args, int len) ftpAddUPNPPortForward(port, port); } - ip_t remoteFTPServerIp = ftpFindExternalFTPServerIp(ftpGetSession(sessionId)->remoteIp); + remoteFTPServerIp = ftpFindExternalFTPServerIp(ftpGetSession(sessionId)->remoteIp); sprintf(str, "%s (%d,%d,%d,%d,%d,%d)", ftpMsg029, diff --git a/source/shared_lib/sources/platform/posix/socket.cpp b/source/shared_lib/sources/platform/posix/socket.cpp index 2fc5bc51..82fcd5f4 100644 --- a/source/shared_lib/sources/platform/posix/socket.cpp +++ b/source/shared_lib/sources/platform/posix/socket.cpp @@ -307,11 +307,12 @@ string Ip::getString() const{ #if defined(__FreeBSD__) || defined(BSD) || defined(__APPLE__) || defined(__linux__) # define USE_GETIFADDRS 1 # include +#endif + static uint32 SockAddrToUint32(struct sockaddr * a) { return ((a)&&(a->sa_family == AF_INET)) ? ntohl(((struct sockaddr_in *)a)->sin_addr.s_addr) : 0; } -#endif // convert a numeric IP address into its string representation static void Inet_NtoA(uint32 addr, char * ipbuf)