aboutsummaryrefslogtreecommitdiff
path: root/qemu-common.h
diff options
context:
space:
mode:
Diffstat (limited to 'qemu-common.h')
-rw-r--r--qemu-common.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/qemu-common.h b/qemu-common.h
index d3df63ea01..6ee31e0788 100644
--- a/qemu-common.h
+++ b/qemu-common.h
@@ -2,6 +2,13 @@
#ifndef QEMU_COMMON_H
#define QEMU_COMMON_H
+#define noreturn __attribute__ ((__noreturn__))
+
+/* Hack around the mess dyngen-exec.h causes: We need noreturn in files that
+ cannot include the following headers without conflicts. This condition has
+ to be removed once dyngen is gone. */
+#ifndef __DYNGEN_EXEC_H__
+
/* we put basic includes here to avoid repeating them in device drivers */
#include <stdlib.h>
#include <stdio.h>
@@ -134,9 +141,8 @@ void *get_mmap_addr(unsigned long size);
/* Error handling. */
-void hw_error(const char *fmt, ...)
- __attribute__ ((__format__ (__printf__, 1, 2)))
- __attribute__ ((__noreturn__));
+void noreturn hw_error(const char *fmt, ...)
+ __attribute__ ((__format__ (__printf__, 1, 2)));
/* IO callbacks. */
typedef void IOReadHandler(void *opaque, const uint8_t *buf, int size);
@@ -179,4 +185,6 @@ int cpu_load(QEMUFile *f, void *opaque, int version_id);
/* Force QEMU to stop what it's doing and service IO */
void qemu_service_io(void);
+#endif /* dyngen-exec.h hack */
+
#endif