Merge pull request #210 from rakslice/slirp_ftp_fix

cast address pointer passed to getsockname
This commit is contained in:
kanjitalk755 2024-10-06 10:46:03 +09:00 committed by GitHub
commit 1928f2ecef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1012,7 +1012,7 @@ do_prompt:
/* local side address of control conn */
struct sockaddr_in addr;
socklen_t addrlen = sizeof(struct sockaddr_in);
if (getsockname(control_so->s, &addr, &addrlen) == 0) {
if (getsockname(control_so->s, (struct sockaddr *)&addr, &addrlen) == 0) {
laddr = ntohl(addr.sin_addr.s_addr);
} else {
/* fall back to whatever we have for our address generally */