diff options
Diffstat (limited to 'linux-user')
-rw-r--r-- | linux-user/syscall.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 5d787bb753..dce5cad594 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -1267,6 +1267,9 @@ static abi_long do_getsockname(int fd, abi_ulong target_addr, void *addr; abi_long ret; + if (target_addr == 0) + return get_errno(accept(fd, NULL, NULL)); + if (get_user_u32(addrlen, target_addrlen_addr)) return -TARGET_EFAULT; |