Fix compiling of dosfstools for arm64

Change-Id: If99d0be4b73cdeb388c6cb1b35a215d3b8b3b58d
diff --git a/Android.mk b/Android.mk
index 2a10877..203c901 100644
--- a/Android.mk
+++ b/Android.mk
@@ -312,14 +312,13 @@
     teamwin \
     toolbox_symlinks \
     twrp \
-    unpigz_symlink
+    unpigz_symlink \
+    dosfsck \
+    dosfslabel \
+    fsck_msdos_symlink \
+    mkdosfs
 
 ifneq ($(TARGET_ARCH), arm64)
-    LOCAL_ADDITIONAL_DEPENDENCIES += \
-        dosfsck \
-        dosfslabel \
-        fsck_msdos_symlink \
-        mkdosfs
     LOCAL_LDFLAGS += -Wl,-dynamic-linker,/sbin/linker
 else
     LOCAL_LDFLAGS += -Wl,-dynamic-linker,/sbin/linker64
@@ -487,11 +486,8 @@
     $(commands_recovery_local_path)/libmincrypt/Android.mk \
     $(commands_recovery_local_path)/twrpTarMain/Android.mk \
     $(commands_recovery_local_path)/mtp/Android.mk \
-    $(commands_recovery_local_path)/minzip/Android.mk
-
-ifneq ($(TARGET_ARCH), arm64)
-    include $(commands_recovery_local_path)/dosfstools/Android.mk
-endif
+    $(commands_recovery_local_path)/minzip/Android.mk \
+    $(commands_recovery_local_path)/dosfstools/Android.mk
 
 ifeq ($(TW_INCLUDE_CRYPTO), true)
     include $(commands_recovery_local_path)/crypto/lollipop/Android.mk
diff --git a/dosfstools/Android.mk b/dosfstools/Android.mk
index 7c8592d..15503c2 100644
--- a/dosfstools/Android.mk
+++ b/dosfstools/Android.mk
@@ -4,7 +4,7 @@
 include $(CLEAR_VARS)
 LOCAL_SRC_FILES := src/boot.c src/check.c src/common.c \
 	src/fat.c src/file.c src/io.c src/lfn.c src/dosfsck.c
-LOCAL_C_INCLUDES := $(KERNEL_HEADERS)
+#LOCAL_C_INCLUDES := $(KERNEL_HEADERS)
 LOCAL_SHARED_LIBRARIES := libc
 LOCAL_CFLAGS += -D_USING_BIONIC_
 LOCAL_CFLAGS += -DUSE_ANDROID_RETVALS
@@ -33,8 +33,8 @@
 include $(CLEAR_VARS)
 LOCAL_SRC_FILES := src/boot.c src/check.c src/common.c src/fat.c \
 	src/file.c src/io.c src/lfn.c src/dosfslabel.c
-LOCAL_C_INCLUDES := $(KERNEL_HEADERS) \
-	bionic/libc/kernel/common
+#LOCAL_C_INCLUDES := $(KERNEL_HEADERS)
+LOCAL_C_INCLUDES += bionic/libc/kernel/common
 LOCAL_SHARED_LIBRARIES := libc
 LOCAL_CFLAGS += -D_USING_BIONIC_
 LOCAL_MODULE = dosfslabel
@@ -45,7 +45,7 @@
 
 include $(CLEAR_VARS)
 LOCAL_SRC_FILES := src/mkdosfs.c
-LOCAL_C_INCLUDES := $(KERNEL_HEADERS)
+#LOCAL_C_INCLUDES := $(KERNEL_HEADERS)
 LOCAL_SHARED_LIBRARIES := libc
 LOCAL_CFLAGS += -D_USING_BIONIC_
 LOCAL_MODULE = mkdosfs
diff --git a/prebuilt/Android.mk b/prebuilt/Android.mk
index cc0765c..7d1dceb 100644
--- a/prebuilt/Android.mk
+++ b/prebuilt/Android.mk
@@ -20,12 +20,9 @@
 	RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so
 endif
 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/pigz
-# dosfstools does not build for arm64 right now
-ifneq ($(TARGET_ARCH), arm64)
-    RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/dosfsck
-    RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/dosfslabel
-    RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/mkdosfs
-endif
+RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/dosfsck
+RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/dosfslabel
+RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/mkdosfs
 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/e2fsck
 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/mke2fs
 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/tune2fs