On 01/23/2012 04:04 AM, Simon Josefsson wrote: > Bruno Haible <br...@clisp.org> writes: > >> 2) Change stdint.h to just include the system's <stdint.h> when >> __BIONIC__ and _SYS_TYPES_H_ are defined but _SSIZE_T_DEFINED_ is not >> yet defined. >> >> The latter is simpler (does not require to override sys/types.h), so I'm >> applying that. > > Thank you Bruno, I can confirm that it works. I'm now trying to build > more of gnulib for Android, let's see what breaks... > > Hans-Christoph, could try to update GnuPG with latest gnulib, to see if > you can make it build? Or just apply Bruno's patch, that may be safer. > > /Simon
I tried building gnupg again with Bruno's patch applied, but it still died. Here's the log: /usr/local/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc --sysroot=/usr/local/android-ndk/platforms/android-9/arch-arm -DHAVE_CONFIG_H -I. -I.. -DANDROID -I/media/share/code/guardianproject/gnupg-for-android/external/include -O3 -Wall -Wcast-align -Wshadow -Wstrict-prototypes -Wformat -Wno-format-y2k -Wformat-security -W -Wno-sign-compare -Wno-missing-field-initializers -Wdeclaration-after-statement -Wno-pointer-sign -Wpointer-arith -MT allocsa.o -MD -MP -MF .deps/allocsa.Tpo -c -o allocsa.o allocsa.c In file included from /usr/local/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.4.3/include-fixed/sys/types.h:43, from /usr/local/android-ndk/platforms/android-9/arch-arm/usr/include/strings.h:42, from /usr/local/android-ndk/platforms/android-9/arch-arm/usr/include/stdlib.h:42, from allocsa.h:23, from allocsa.c:21: ./stdint.h:32:3: error: invalid preprocessing directive #@ In file included from /usr/local/android-ndk/platforms/android-9/arch-arm/usr/include/strings.h:42, from /usr/local/android-ndk/platforms/android-9/arch-arm/usr/include/stdlib.h:42, from allocsa.h:23, from allocsa.c:21: /usr/local/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.4.3/include-fixed/sys/types.h:134: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'u_int32_t' /usr/local/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.4.3/include-fixed/sys/types.h:135: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'u_int16_t' /usr/local/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.4.3/include-fixed/sys/types.h:136: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'u_int8_t' /usr/local/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.4.3/include-fixed/sys/types.h:137: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'u_int64_t' allocsa.c: In function 'mallocsa': allocsa.c:82: warning: cast increases required alignment of target type allocsa.c:86: warning: cast increases required alignment of target type allocsa.c: In function 'freesa': allocsa.c:126: warning: cast increases required alignment of target type allocsa.c:130: warning: cast increases required alignment of target type .hc