Date: Monday, May 25, 2015 @ 17:45:39 Author: eworm Revision: 134068 actually add the patch...
Added: oath-toolkit/trunk/0001-fix-make-check-on-32-bit-systems.patch ---------------------------------------------+ 0001-fix-make-check-on-32-bit-systems.patch | 43 ++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) Added: 0001-fix-make-check-on-32-bit-systems.patch =================================================================== --- 0001-fix-make-check-on-32-bit-systems.patch (rev 0) +++ 0001-fix-make-check-on-32-bit-systems.patch 2015-05-25 15:45:39 UTC (rev 134068) @@ -0,0 +1,43 @@ +From 547065646f96d8e7a3b88ebc03b0fd35294e9d11 Mon Sep 17 00:00:00 2001 +From: Christian Hesse <m...@eworm.de> +Date: Mon, 25 May 2015 17:34:19 +0200 +Subject: [PATCH 1/1] fix make check on 32 bit systems + +Some tests break with time_t limited to 32 bit. The test code has +exception, but bad values. Update the values to what we expect and make +tests pass. + +Signed-off-by: Christian Hesse <m...@eworm.de> +--- + liboath/tests/tst_totp_algo.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/liboath/tests/tst_totp_algo.c b/liboath/tests/tst_totp_algo.c +index 019efb9..f56be1f 100644 +--- a/liboath/tests/tst_totp_algo.c ++++ b/liboath/tests/tst_totp_algo.c +@@ -131,8 +131,8 @@ main (void) + if (strcmp (otp, tv[i].sha256otp) != 0) + { + printf ("otp[%ld] got %s expected2 %s\n", i, otp, tv[i].sha256otp); +- if (strcmp (otp, "82762030") == 0 +- && strcmp (tv[i].sha256otp, "65353130") == 0) ++ if (strcmp (otp, "11281421") == 0 ++ && strcmp (tv[i].sha256otp, "77737706") == 0) + printf ("Mismatch due to 32-bit time_t...\n"); + else + return 1; +@@ -153,8 +153,8 @@ main (void) + if (strcmp (otp, tv[i].sha512otp) != 0) + { + printf ("otp[%ld] got %s expected2 %s\n", i, otp, tv[i].sha512otp); +- if (strcmp (otp, "82762030") == 0 +- && strcmp (tv[i].sha512otp, "65353130") == 0) ++ if (strcmp (otp, "29833534") == 0 ++ && strcmp (tv[i].sha512otp, "47863826") == 0) + printf ("Mismatch due to 32-bit time_t...\n"); + else + return 1; +-- +2.4.1 +