title: linux/types.h:21:1: error: unknown type name '__u16'
body: <p>I have used ndk revision r10d on my machine to compile and run sample programs successfully before. But this new project, which uses the same header file stdio.h gives the following error(s). The errors are from a file, which stdio references. And although I do not see the variables defined in the file, I want to understand how it worked last time. The errors are from /linux/types.h file stating that __16 is not defined type. </p>
  
  <p>@Michael - Thanks. I did what you suggested, and here is the Android.mk file and results of compile. Basically the API level is changed, but the error persists:</p>
  
  <pre><code>LOCAL_PATH := $(call my-dir)
  include $(CLEAR_VARS) 
  # give module name
  APP_PLATFORM := android-18
  LOCAL_MODULE := hello_tz  
  $(warning This is in NDK_ROOT $(NDK_ROOT))
  LOCAL_C_INCLUDES += $(NDK_ROOT)/platforms/$(APP_PLATFORM)/arch-arm/usr/include
  APP_ABI := armeabi-v7a
  #LOCAL_CFLAGS := -mcpu=cortex-m3 -mthumb -march=armv7-a -mtune=cortex-a15
  #LOCAL_CFLAGS := -mcpu=cortex-a15 -march=armv7-a
  LOCAL_CFLAGS := -D__ASSEMBLY__ -mabi=aapcs-linux -gdwarf-2 -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-
  aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -Os -Wno
  -maybe-uninitialized -marm -fno-dwarf2-cfi-asm -fstack-protector -mabi=aapcs-linux -mno-thumb-interwork -funwind-tables 
  -D__LINUX_ARM_ARCH__=7 -mcpu=cortex-a15 -msoft-float -Uarm -Wframe-larger-than=1024 -Wno-unused-but-set-variable -fomit-
  frame-pointer -g -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOT
  O
  # list your C files to compile
  FILE_LIST := $(patsubst %.c,%.c.arm,$(wildcard $(LOCAL_PATH)/*.c))
  #$(warning here is what is in FILE_LIST after an attempt to collect all the C files$(FILE_LIST))
  FILE_LIST += $(wildcard $(LOCAL_PATH)/*.s)
  #$(warning here is what is in FILE_LIST after an attempt to collect all the S files$(FILE_LIST))
  LOCAL_SRC_FILES := $(FILE_LIST:$(LOCAL_PATH)/%=%)
  # this option will build executables instead of building library for android application.
  include $(BUILD_EXECUTABLE)
  
  
  In file included from /home/sansari/android/android-ndk-r10d/platforms/android-18/arch-arm/usr/include/sys/types.h:39:0,
                   from /home/sansari/android/android-ndk-r10d/platforms/android-18/arch-arm/usr/include/stdio.h:50,
                   from jni/main_normal.c:1:
  /home/sansari/android/android-ndk-r10d/platforms/android-18/arch-arm/usr/include/linux/types.h:21:1: error: unknown type name '__u16'
   typedef __u16 __bitwise __le16;
   ^
  /home/sansari/android/android-ndk-r10d/platforms/android-18/arch-arm/usr/include/linux/types.h:22:1: error: unknown type name '__u16'
   typedef __u16 __bitwise __be16;
   ^
  /home/sansari/android/android-ndk-r10d/platforms/android-18/arch-arm/usr/include/linux/types.h:23:1: error: unknown type name '__u32'
   typedef __u32 __bitwise __le32;
   ^
  /home/sansari/android/android-ndk-r10d/platforms/android-18/arch-arm/usr/include/linux/types.h:24:1: error: unknown type name '__u32'
   typedef __u32 __bitwise __be32;
   ^
  /home/sansari/android/android-ndk-r10d/platforms/android-18/arch-arm/usr/include/linux/types.h:26:1: error: unknown type name '__u64'
   typedef __u64 __bitwise __le64;
   ^
  /home/sansari/android/android-ndk-r10d/platforms/android-18/arch-arm/usr/include/linux/types.h:27:1: error: unknown type name '__u64'
   typedef __u64 __bitwise __be64;
   ^
  In file included from /home/sansari/android/android-ndk-r10d/platforms/android-18/arch-arm/usr/include/stdio.h:50:0,
                   from jni/main_normal.c:1:
  /home/sansari/android/android-ndk-r10d/platforms/android-18/arch-arm/usr/include/sys/types.h:42:1: error: unknown type name '__u32'
   typedef __u32    __kernel_dev_t;
  </code></pre>