aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2023-09-25 15:36:04 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2023-10-03 15:05:20 +0400
commit75b773d84c89220463a14a6883d2b2a8e49e5b68 (patch)
tree1a1e526ff9d3004b7852f3901713e6f6033f14b6 /util
parent7db57a73f66463488fbd53fe5f9589de49534fe8 (diff)
win32: avoid discarding the exception handler
In all likelihood, the compiler with lto doesn't see the function being used, from assembly macro __try1. Help it by marking the function has being used. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1904 Fixes: commit d89f30b4df ("win32: wrap socket close() with an exception handler") Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'util')
-rw-r--r--util/oslib-win32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/oslib-win32.c b/util/oslib-win32.c
index 19a0ea7fbe..55b0189dc3 100644
--- a/util/oslib-win32.c
+++ b/util/oslib-win32.c
@@ -479,7 +479,7 @@ int qemu_bind_wrap(int sockfd, const struct sockaddr *addr,
return ret;
}
-EXCEPTION_DISPOSITION
+QEMU_USED EXCEPTION_DISPOSITION
win32_close_exception_handler(struct _EXCEPTION_RECORD *exception_record,
void *registration, struct _CONTEXT *context,
void *dispatcher)