From 51aeff70218e18a7213fc6b7b9a4112be488bf58 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Tue, 8 Oct 2013 18:30:44 -0700 Subject: [PATCH] Fix 32-bit build. libc/tzcode/localtime.c: In function 'differ_by_repeat': libc/tzcode/localtime.c:338:2: error: comparison is always false due to limited range of data type [-Werror=type-limits] Change-Id: Ic84be6391a66e9d50ed98f41d865387c77a60ffa --- libc/tzcode/localtime.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libc/tzcode/localtime.c b/libc/tzcode/localtime.c index a52e334a3..e2599b439 100644 --- a/libc/tzcode/localtime.c +++ b/libc/tzcode/localtime.c @@ -335,7 +335,9 @@ differ_by_repeat(const time_t t1, const time_t t0) { if (TYPE_BIT(time_t) - TYPE_SIGNED(time_t) < SECSPERREPEAT_BITS) return 0; +#if __LP64__ // 32-bit Android only has a signed 32-bit time_t; 64-bit Android is fixed. return t1 - t0 == SECSPERREPEAT; +#endif } static int