summaryrefslogtreecommitdiffstats
path: root/include/qemu/osdep.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/qemu/osdep.h')
-rw-r--r--include/qemu/osdep.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index 431cf71364..4538fdca42 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -26,8 +26,25 @@
#define QEMU_OSDEP_H
#include "config-host.h"
+#ifdef NEED_CPU_H
+#include "config-target.h"
+#endif
#include "qemu/compiler.h"
+/* Older versions of C++ don't get definitions of various macros from
+ * stdlib.h unless we define these macros before first inclusion of
+ * that system header.
+ */
+#ifndef __STDC_CONSTANT_MACROS
+#define __STDC_CONSTANT_MACROS
+#endif
+#ifndef __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS
+#endif
+#ifndef __STDC_FORMAT_MACROS
+#define __STDC_FORMAT_MACROS
+#endif
+
/* The following block of code temporarily renames the daemon() function so the
* compiler does not see the warning associated with it in stdlib.h on OSX
*/