diff --git a/qemu/hw/i386/pc.c b/qemu/hw/i386/pc.c
index 36c5f8cb..8f3c9205 100644
--- a/qemu/hw/i386/pc.c
+++ b/qemu/hw/i386/pc.c
@@ -23,6 +23,7 @@
*/
/* Modified for Unicorn Engine by Nguyen Anh Quynh, 2015 */
+#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/i386/pc.h"
#include "sysemu/cpus.h"
diff --git a/qemu/hw/i386/pc_piix.c b/qemu/hw/i386/pc_piix.c
index a5ea8628..9a3fde1a 100644
--- a/qemu/hw/i386/pc_piix.c
+++ b/qemu/hw/i386/pc_piix.c
@@ -23,6 +23,7 @@
*/
/* Modified for Unicorn Engine by Nguyen Anh Quynh, 2015 */
+#include "qemu/osdep.h"
#include "hw/i386/pc.h"
#include "hw/boards.h"
#include "exec/address-spaces.h"
diff --git a/qemu/hw/intc/apic_common.c b/qemu/hw/intc/apic_common.c
index baab720a..80e7ae55 100644
--- a/qemu/hw/intc/apic_common.c
+++ b/qemu/hw/intc/apic_common.c
@@ -17,6 +17,7 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see
*/
+#include "qemu/osdep.h"
#include "hw/i386/apic.h"
#include "hw/i386/apic_internal.h"
#include "hw/qdev.h"
diff --git a/qemu/target-i386/arch_memory_mapping.c b/qemu/target-i386/arch_memory_mapping.c
index ac0b73f2..d893f897 100644
--- a/qemu/target-i386/arch_memory_mapping.c
+++ b/qemu/target-i386/arch_memory_mapping.c
@@ -11,6 +11,7 @@
*
*/
+#include "qemu/osdep.h"
#include "cpu.h"
#include "exec/cpu-all.h"
#include "sysemu/memory_mapping.h"
diff --git a/qemu/target-i386/bpt_helper.c b/qemu/target-i386/bpt_helper.c
index a072089c..2e19fb4f 100644
--- a/qemu/target-i386/bpt_helper.c
+++ b/qemu/target-i386/bpt_helper.c
@@ -17,6 +17,7 @@
* License along with this library; if not, see .
*/
+#include "qemu/osdep.h"
#include "cpu.h"
#include "exec/helper-proto.h"
diff --git a/qemu/target-i386/cc_helper.c b/qemu/target-i386/cc_helper.c
index 28a294b0..426a2122 100644
--- a/qemu/target-i386/cc_helper.c
+++ b/qemu/target-i386/cc_helper.c
@@ -17,6 +17,7 @@
* License along with this library; if not, see .
*/
+#include "qemu/osdep.h"
#include "cpu.h"
#include "exec/helper-proto.h"
diff --git a/qemu/target-i386/cpu.c b/qemu/target-i386/cpu.c
index 5d82eda6..d8d5a16a 100644
--- a/qemu/target-i386/cpu.c
+++ b/qemu/target-i386/cpu.c
@@ -16,9 +16,8 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see .
*/
-#include
-#include
-#include
+
+#include "qemu/osdep.h"
#include "unicorn/platform.h"
#include "cpu.h"
diff --git a/qemu/target-i386/excp_helper.c b/qemu/target-i386/excp_helper.c
index e5959e2c..47fbdbbf 100644
--- a/qemu/target-i386/excp_helper.c
+++ b/qemu/target-i386/excp_helper.c
@@ -17,6 +17,7 @@
* License along with this library; if not, see .
*/
+#include "qemu/osdep.h"
#include "cpu.h"
#include "qemu/log.h"
#include "sysemu/sysemu.h"
diff --git a/qemu/target-i386/fpu_helper.c b/qemu/target-i386/fpu_helper.c
index 386e55bb..3a9cc73a 100644
--- a/qemu/target-i386/fpu_helper.c
+++ b/qemu/target-i386/fpu_helper.c
@@ -17,6 +17,7 @@
* License along with this library; if not, see .
*/
+#include "qemu/osdep.h"
#include
#include "cpu.h"
#include "exec/helper-proto.h"
diff --git a/qemu/target-i386/helper.c b/qemu/target-i386/helper.c
index ecbabe94..31080853 100644
--- a/qemu/target-i386/helper.c
+++ b/qemu/target-i386/helper.c
@@ -17,6 +17,7 @@
* License along with this library; if not, see .
*/
+#include "qemu/osdep.h"
#include "cpu.h"
#ifndef CONFIG_USER_ONLY
#include "sysemu/sysemu.h"
diff --git a/qemu/target-i386/int_helper.c b/qemu/target-i386/int_helper.c
index 827b6e88..6f79cb92 100644
--- a/qemu/target-i386/int_helper.c
+++ b/qemu/target-i386/int_helper.c
@@ -17,6 +17,7 @@
* License along with this library; if not, see .
*/
+#include "qemu/osdep.h"
#include "cpu.h"
#include "qemu/host-utils.h"
#include "exec/helper-proto.h"
diff --git a/qemu/target-i386/mem_helper.c b/qemu/target-i386/mem_helper.c
index 876c1921..5351fd4b 100644
--- a/qemu/target-i386/mem_helper.c
+++ b/qemu/target-i386/mem_helper.c
@@ -17,6 +17,7 @@
* License along with this library; if not, see .
*/
+#include "qemu/osdep.h"
#include "cpu.h"
#include "exec/helper-proto.h"
#include "exec/cpu_ldst.h"
diff --git a/qemu/target-i386/misc_helper.c b/qemu/target-i386/misc_helper.c
index 925a0af7..0e5f7090 100644
--- a/qemu/target-i386/misc_helper.c
+++ b/qemu/target-i386/misc_helper.c
@@ -17,6 +17,7 @@
* License along with this library; if not, see .
*/
+#include "qemu/osdep.h"
#include "cpu.h"
#include "exec/ioport.h"
#include "exec/helper-proto.h"
diff --git a/qemu/target-i386/seg_helper.c b/qemu/target-i386/seg_helper.c
index 263fba36..a962a30e 100644
--- a/qemu/target-i386/seg_helper.c
+++ b/qemu/target-i386/seg_helper.c
@@ -18,6 +18,7 @@
* License along with this library; if not, see .
*/
+#include "qemu/osdep.h"
#include "cpu.h"
#include "qemu/log.h"
#include "exec/helper-proto.h"
diff --git a/qemu/target-i386/smm_helper.c b/qemu/target-i386/smm_helper.c
index 94736433..6af316ce 100644
--- a/qemu/target-i386/smm_helper.c
+++ b/qemu/target-i386/smm_helper.c
@@ -17,6 +17,7 @@
* License along with this library; if not, see .
*/
+#include "qemu/osdep.h"
#include "cpu.h"
#include "exec/helper-proto.h"
diff --git a/qemu/target-i386/svm_helper.c b/qemu/target-i386/svm_helper.c
index 06d9f7a1..b47c1f74 100644
--- a/qemu/target-i386/svm_helper.c
+++ b/qemu/target-i386/svm_helper.c
@@ -17,6 +17,7 @@
* License along with this library; if not, see .
*/
+#include "qemu/osdep.h"
#include "cpu.h"
#include "exec/cpu-all.h"
#include "exec/helper-proto.h"
diff --git a/qemu/target-i386/translate.c b/qemu/target-i386/translate.c
index 453514cc..d4b447ff 100644
--- a/qemu/target-i386/translate.c
+++ b/qemu/target-i386/translate.c
@@ -16,18 +16,14 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see .
*/
-#include
-#include
-#include
-#include
+
+#include "qemu/osdep.h"
#include "unicorn/platform.h"
-#include
#include "qemu/host-utils.h"
#include "cpu.h"
#include "tcg-op.h"
#include "exec/cpu_ldst.h"
-
#include "exec/helper-proto.h"
#include "exec/helper-gen.h"