Package: profanity
Version: 0.4.4-1
Severity: important
Tags: sid + patch
Justification: FTBFS
User: [email protected]
Hello,
Package profanity_0.4.4-1 FTBFS on big endian architectures.
https://buildd.debian.org/status/package.php?p=profanity&suite=sid
I have attached a patch resolving this issue.
Thank you!
Regards,
Jurica
--- profanity-0.4.4.orig/src/tools/p_sha1.c
+++ profanity-0.4.4/src/tools/p_sha1.c
@@ -107,13 +107,7 @@ void P_SHA1_Transform(uint32_t state[5],
/* blk0() and blk() perform the initial expand. */
/* I got the idea of expanding during the round function from SSLeay */
-/* FIXME: can we do this in an endian-proof way? */
-#ifdef WORDS_BIGENDIAN
-#define blk0(i) block->l[i]
-#else
-#define blk0(i) (block->l[i] = (rol(block->l[i],24)&0xFF00FF00) \
- |(rol(block->l[i],8)&0x00FF00FF))
-#endif
+#define blk0(i) (block->l[i] = (ntohl(block->l[i])))
#define blk(i) (block->l[i&15] = rol(block->l[(i+13)&15]^block->l[(i+8)&15] \
^block->l[(i+2)&15]^block->l[i&15],1))