OSDN Git Service

Fix the 32-bit executable building errors on lollipop lollipop-x86 marshmallow-x86 nougat-x86 android-x86-6.0-r1 android-x86-6.0-r2 android-x86-6.0-r3 android-x86-7.1-r1 android-x86-7.1-r2 android-x86-7.1-r3 android-x86-7.1-r4 android-x86-7.1-r5 android-x86-8.1-r1
authorChih-Wei Huang <cwhuang@linux.org.tw>
Tue, 20 Oct 2015 10:19:25 +0000 (18:19 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 21 Oct 2015 01:25:52 +0000 (09:25 +0800)
Now the lollipop bionic has full kernel uapi headers.
Just convert the old macros to match the new headers.
No additional hacking is needed.

Android.mk
v86.h
x86emu/x86emu/x86emui.h

index eff5898..bd7acb1 100644 (file)
@@ -10,13 +10,14 @@ LOCAL_PATH := $(call my-dir)
 
 include $(CLEAR_VARS)
 
-KERNEL_DIR ?= kernel
-
-use_uapi = $(firstword $(wildcard $(addprefix $(KERNEL_DIR)/include/,uapi/$(1) $(1))))
-
-LOCAL_CFLAGS += \
-       -include $(call use_uapi,video/uvesafb.h) \
-       -include $(call use_uapi,linux/connector.h)
+LOCAL_CFLAGS := \
+       -Wno-unused-parameter
+
+LOCAL_CFLAGS_x86 := \
+       -DIF_MASK=X86_EFLAGS_IF \
+       -DIOPL_MASK=X86_EFLAGS_IOPL \
+       -DTF_MASK=X86_EFLAGS_TF \
+       -DVIF_MASK=X86_EFLAGS_VIF
 
 LOCAL_SRC_FILES := \
        v86.c \
diff --git a/v86.h b/v86.h
index 6af4ba0..b096975 100644 (file)
--- a/v86.h
+++ b/v86.h
 
 struct completion;
 
-#ifndef __ANDROID__
 #include <linux/connector.h>
 #include <video/uvesafb.h>
-#endif
 
 //#define ulog(args...)        do {} while (0)
 //#define ulog(args...)                fprintf(stdout, ##args)
index e6c311f..9427d6f 100644 (file)
@@ -57,7 +57,7 @@
 #ifdef __cplusplus
 #define        X86EMU_UNUSED(v)
 #else
-#define        X86EMU_UNUSED(v)        v
+#define        X86EMU_UNUSED(v)        __attribute__((unused)) v
 #endif
 
 #include "x86emu.h"