Source: cvs
Version: 2:1.12.13+real-9
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: port-x32 ftbfs-gnulib

cvs fails to build on x32 with a compile-time assertion failing:

<URL:http://buildd.debian-ports.org/status/fetch.php?pkg=cvs&arch=x32&ver=2%3A1.12.13%2Breal-9&stamp=1359065927>

cc -DHAVE_CONFIG_H -I. -I../../../lib -I..   -D_FORTIFY_SOURCE=2
-D_GNU_SOURCE -DUSE_LIBBSD  -g -O2 -fPIE -fstack-protector
--param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall
-fno-strict-aliasing -Wformat -Wno-unused-result -c
../../../lib/strftime.c
../../../lib/mktime.c: In function 'ydhms_diff':
../../../lib/mktime.c:170:3: error: size of array 'a' is negative
make[4]: *** [mktime.o] Error 1

The offending check is that INT_MAX <= LONG_MAX / 2 || TIME_T_MAX <=
UINT_MAX, which fails because on x32 sizeof(int) == sizeof(long) == 4
but sizeof(time_t) == 8.  Looking at the following code, though, it
seems like it should still work in this situation.

Attaching the debdiff I'm using to fix this failure.  It's heavily
based on the patch at
<URL:http://sources.gentoo.org/dev-vcs/cvs/files/cvs-1.12.12-mktime-x32.patch>
which is linked from
<URL:https://sites.google.com/site/x32abi/x32-patches>.  Or, this
should be fixed in current gnulib git.
-- 
Daniel Schepler

Attachment: cvs.debdiff
Description: Binary data

Reply via email to