summaryrefslogtreecommitdiffstats
path: root/tests/tcg
diff options
context:
space:
mode:
authorRichard Henderson2020-10-05 18:41:26 +0200
committerRichard Henderson2020-10-15 06:19:52 +0200
commit51f22c195b644d6ec0a175c2a3790495e1993d9d (patch)
tree283fd3255fd8cf09ef948721ba1e5db3fddebec6 /tests/tcg
parentMerge remote-tracking branch 'remotes/kraxel/tags/ui-20201014-pull-request' i... (diff)
downloadqemu-51f22c195b644d6ec0a175c2a3790495e1993d9d.tar.gz
qemu-51f22c195b644d6ec0a175c2a3790495e1993d9d.tar.xz
qemu-51f22c195b644d6ec0a175c2a3790495e1993d9d.zip
tests/tcg/linux-test: Adjust getsockname for musl
Unlike glibc, musl does not use transparent unions to hide the different structures that overlap struct sockaddr. Add an explicit cast to work around this. Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tests/tcg')
-rw-r--r--tests/tcg/multiarch/linux-test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/tcg/multiarch/linux-test.c b/tests/tcg/multiarch/linux-test.c
index 8a7c15cd31..96bbad5823 100644
--- a/tests/tcg/multiarch/linux-test.c
+++ b/tests/tcg/multiarch/linux-test.c
@@ -296,7 +296,7 @@ static void test_socket(void)
server_fd = server_socket();
/* find out what port we got */
socklen = sizeof(server_addr);
- ret = getsockname(server_fd, &server_addr, &socklen);
+ ret = getsockname(server_fd, (struct sockaddr *)&server_addr, &socklen);
chk_error(ret);
server_port = ntohs(server_addr.sin_port);