Package: kbtin Version: 1.0.14-1 Severity: serious Tags: sid patch Justification: FTBFS User: debian-mips-dev-disc...@lists.alioth.debian.org Usertags: mips-patch
Hello, Package kbtin_1.0.14-1 FTBFS on all big endian architectures (mips, powerpc, s390x, sparc). complet build logs: mips https://buildd.debian.org/status/fetch.php?pkg=kbtin&arch=mips&ver=1.0.14-1&stamp=1383184670 powerpc https://buildd.debian.org/status/fetch.php?pkg=kbtin&arch=powerpc&ver=1.0.14-1&stamp=1362306329 s390x https://buildd.debian.org/status/fetch.php?pkg=kbtin&arch=s390x&ver=1.0.14-1&stamp=1398863294 sparc https://buildd.debian.org/status/fetch.php?pkg=kbtin&arch=sparc&ver=1.0.14-1&stamp=1361136299 I was able to build package kbtin_1.0.14-1 on mips (big endian) with following patch. File ttyrec_big_endian.patch is attached. These changes are already in master branch for kbtin package on git. https://github.com/kilobyte/kbtin/commit/a5c0ef55f909ddc3487d355c25f40b3c18c93946 Regards, Jurica
--- kbtin-1.0.14.orig/files.c +++ kbtin-1.0.14/files.c @@ -273,7 +273,7 @@ void write_log(struct session *ses, char if (ses->logtype==2) { ttyrec_timestamp(&th); - th.len=n; + th.len=to_little_endian(n); if (fwrite(&th, 1, sizeof(struct ttyrec_header), ses->logfile)< sizeof(struct ttyrec_header)) { --- kbtin-1.0.14.orig/tintin.h +++ kbtin-1.0.14/tintin.h @@ -363,10 +363,10 @@ typedef char pvars_t[10][BUFFER_SIZE]; #ifdef WORDS_BIGENDIAN # define to_little_endian(x) ((uint32_t) ( \ - (((uint32_t)(x) &((uint32_t)0x000000ffU) << 24)) | \ - (((uint32_t)(x) &((uint32_t)0x0000ff00U) << 8)) | \ - (((uint32_t)(x) &((uint32_t)0x00ff0000U) >> 8)) | \ - (((uint32_t)(x) &((uint32_t)0xff000000U) >> 24)))) + ((uint32_t)(x) &(uint32_t)0x000000ffU) << 24 | \ + ((uint32_t)(x) &(uint32_t)0x0000ff00U) << 8 | \ + ((uint32_t)(x) &(uint32_t)0x00ff0000U) >> 8 | \ + ((uint32_t)(x) &(uint32_t)0xff000000U) >> 24)) #else # define to_little_endian(x) ((uint32_t)(x)) #endif