Package: autounit Version: 0.15.2-5 Severity: normal Tags: patch When building 'autounit' on ppc64/unstable, I get the following error:
.!...........! FAIL 2 of 14 AuNetstring Tests 1.480705 s (480705 us) total elapsed time au_test_gstring_to_netstring: elapsed time 0.000228 s (228 us):failed assertions (0 of 0): ,serialize/deserialize: elapsed time 0.000000 s (0 us):failed assertions (1 of 1): test.c:349:FAIL:test failed with signal FAIL: test-au-netstring PASS: test-suite PASS: test-test =================== 1 of 3 tests failed =================== make[4]: *** [check-TESTS] Error 1 make[4]: Leaving directory `/autounit-0.15.2/c-unit/TEST' With the attached patch 'autounit' can be compiled on ppc64. The patch changes the format of a sscanf parameter of type size_t from "%d" to "%ld". Without this change the result is undefined on 64-bit architectures where size_t is a 64-bit long int instead of a 32-bit int. Regards Andreas Jochens diff -urN ../tmp-orig/autounit-0.15.2/c-unit/au-netstring.c ./c-unit/au-netstring.c --- ../tmp-orig/autounit-0.15.2/c-unit/au-netstring.c 2002-04-22 22:50:08.000000000 +0000 +++ ./c-unit/au-netstring.c 2006-04-04 12:04:11.000000000 +0000 @@ -49,8 +49,8 @@ size_t ns_len; char *tnbuf; char *tbuf; str = g_string_new(""); - sscanf(ns->str,"%d:",&ns_len); + sscanf(ns->str,"%ld:",&ns_len); tnbuf = strchr(ns->str,(int)':')+1; tbuf = g_strndup(tnbuf,ns_len); /* strndup is a GNU extention, this is just for prototyping. */ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]