Skip to contentSkip to conversation

Include setjmp.h in qemu/osdep.h (bug fix for w64)

PATCH In review Stefan Weil 4 participants 5 messages Mar 12, 2016 – Mar 14, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Include setjmp.h in qemu/osdep.h (bug fix for w64)

setjmp must be declared before sysemu/os-win32.h because it is redefined there for 64 bit Windows.

---

This patch superseeds my previous patch
"Use special code for sigsetjmp only in cpu-exec.c".

It is needed for QEMU on 64 bit Windows to get the correct definition of setjmp (without stack unwinding).

Regards,
Stefan

 include/qemu/osdep.h | 3 +++
 1 file changed, 3 insertions(+)
include/qemu/osdep.h +3 -0
index 4538fdc..5bb374c 100644
@@ -76,6 +76,9 @@ extern int daemon(int, int);
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <assert.h>
+/* setjmp must be declared before sysemu/os-win32.h
+ * because it is redefined there. */
+#include <setjmp.h>
 #include <signal.h>
 
 #ifdef __OpenBSD__
Signature · 1 line
2.1.4
#2 lore raw
In reply to Stefan Weil
Quoted 24 lines · Stefan Weil

setjmp must be declared before sysemu/os-win32.h because it is redefined there for 64 bit Windows.

---

This patch superseeds my previous patch
"Use special code for sigsetjmp only in cpu-exec.c".

It is needed for QEMU on 64 bit Windows to get the correct definition of setjmp (without stack unwinding).

Regards,
Stefan

 include/qemu/osdep.h | 3 +++
 1 file changed, 3 insertions(+)
include/qemu/osdep.h +0 -0
index 4538fdc..5bb374c 100644

include/qemu/osdep.h extern int daemon(int, int); · line 84

Quoted 9 lines
include/qemu/osdep.h +3 -0
@@ -76,6 +76,9 @@ extern int daemon(int, int);
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <assert.h>
+/* setjmp must be declared before sysemu/os-win32.h
+ * because it is redefined there. */
+#include <setjmp.h>
 #include <signal.h>
 
 #ifdef __OpenBSD__

Please add <setjmp.h> to scripts/clean-includes.

#3 lore raw

Am 14.03.2016 um 08:02 schrieb Markus Armbruster:

Quoted 1 line

Stefan Weil <[email protected]> writes:

[...]

Quoted 13 lines
Quoted 13 lines
include/qemu/osdep.h +3 -0
index 4538fdc..5bb374c 100644
@@ -76,6 +76,9 @@ extern int daemon(int, int);
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <assert.h>
+/* setjmp must be declared before sysemu/os-win32.h
+ * because it is redefined there. */
+#include <setjmp.h>
 #include <signal.h>
 
Quoted 4 lines

include/qemu/osdep.h extern int daemon(int, int); · line 84

Quoted 1 line
include/qemu/osdep.h +0 -0
 #ifdef __OpenBSD__

Please add <setjmp.h> to scripts/clean-includes.

Thanks for this hint. I had already prepared a patch which removes the now unneeded setjmp.h include statements and added the modification for scripts/clean-includes to that patch now.

Stefan