summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Heaven <tristan@gentoo.org>2012-07-08 11:44:25 +0000
committerTristan Heaven <tristan@gentoo.org>2012-07-08 11:44:25 +0000
commit89b9303ff198e40f42379081cc914084225d76d9 (patch)
treec2653a065de27a9f35ad9698e76c60e3b5d79727 /app-crypt/md5deep/files
parentEnable X USE flag by default, bug #422803 by Diego Elio Pettenò. Drop old. (diff)
downloadgentoo-2-89b9303ff198e40f42379081cc914084225d76d9.tar.gz
gentoo-2-89b9303ff198e40f42379081cc914084225d76d9.tar.bz2
gentoo-2-89b9303ff198e40f42379081cc914084225d76d9.zip
Version bump
(Portage version: 2.2.0_alpha116/cvs/Linux x86_64)
Diffstat (limited to 'app-crypt/md5deep/files')
-rw-r--r--app-crypt/md5deep/files/md5deep-4.2-strict-aliasing.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/app-crypt/md5deep/files/md5deep-4.2-strict-aliasing.patch b/app-crypt/md5deep/files/md5deep-4.2-strict-aliasing.patch
new file mode 100644
index 000000000000..64e03957df6c
--- /dev/null
+++ b/app-crypt/md5deep/files/md5deep-4.2-strict-aliasing.patch
@@ -0,0 +1,24 @@
+--- trunk/src/md5.c 2012/01/05 22:57:35 577
++++ trunk/src/md5.c 2012/07/02 12:34:09 644
+@@ -143,8 +143,19 @@
+ byteReverse(ctx->in, 14);
+
+ /* Append length in bits and transform */
+- ((uint32_t *) ctx->in)[14] = ctx->bits[0];
+- ((uint32_t *) ctx->in)[15] = ctx->bits[1];
++
++ // the two lines below generated this error:
++ // "md5.c:147:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]"
++
++ //((uint32_t *) ctx->in)[14] = ctx->bits[0];
++ //((uint32_t *) ctx->in)[15] = ctx->bits[1];
++
++ // We will manually expand the cast into two statements to make
++ // the compiler happy...
++
++ uint32_t *ctxin = (uint32_t *)ctx->in;
++ ctxin[14] = ctx->bits[0];
++ ctxin[15] = ctx->bits[1];
+
+ MD5Transform(ctx->buf, (uint32_t *) ctx->in);
+ byteReverse((unsigned char *) ctx->buf, 4);