diff --git a/ndk/platforms/android-9/arch-x86/include/machine/_types.h b/ndk/platforms/android-9/arch-x86/include/machine/_types.h index e9280a5da..65892a11e 100644 --- a/ndk/platforms/android-9/arch-x86/include/machine/_types.h +++ b/ndk/platforms/android-9/arch-x86/include/machine/_types.h @@ -38,7 +38,7 @@ /* the kernel defines size_t as unsigned int, but g++ wants it to be unsigned long */ #ifndef _SIZE_T_DEFINED_ # define _SIZE_T_DEFINED_ -# ifdef ANDROID +# ifdef __ANDROID__ typedef unsigned int size_t; # else typedef unsigned long size_t; @@ -51,7 +51,11 @@ typedef long int ssize_t; #endif #ifndef _PTRDIFF_T #define _PTRDIFF_T -typedef long ptrdiff_t; +# ifdef __ANDROID__ + typedef int ptrdiff_t; +# else + typedef long ptrdiff_t; +# endif #endif #include