From caa15bfe2d6c065d2caff48583f18351bd96915f Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 3 Apr 2014 13:59:14 -0700 Subject: [PATCH] Define __WORDSIZE like glibc. Requested by Google Breakpad, but seems to be assumed to be defined in various places in the AOSP tree already; iputils, wpa_supplicant, et cetera. Change-Id: I1f7833c98e0af4c77e49744c08b8239061c9a571 --- libc/include/sys/cdefs.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libc/include/sys/cdefs.h b/libc/include/sys/cdefs.h index 9fa62df72..685de32c9 100644 --- a/libc/include/sys/cdefs.h +++ b/libc/include/sys/cdefs.h @@ -528,6 +528,13 @@ #define __BIONIC__ 1 #include +/* glibc compatibility. */ +#if __LP64__ +#define __WORDSIZE 64 +#else +#define __WORDSIZE 32 +#endif + /* * When _FORTIFY_SOURCE is defined, automatic bounds checking is * added to commonly used libc functions. If a buffer overrun is