summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-06-25 00:51:37 +0000
committerMike Frysinger <vapier@gentoo.org>2006-06-25 00:51:37 +0000
commit260b966f197e53d9cf3c82c177d4e44321f8f066 (patch)
treed63bd7455472648cc6234bbf4daca2b5f6932fdb /sys-fs/mdadm/files
parentDo not strip binaries in the build process, leave this to portage. Quote vari... (diff)
downloadgentoo-2-260b966f197e53d9cf3c82c177d4e44321f8f066.tar.gz
gentoo-2-260b966f197e53d9cf3c82c177d4e44321f8f066.tar.bz2
gentoo-2-260b966f197e53d9cf3c82c177d4e44321f8f066.zip
Fix up strict alias warnings #137440 by Andrew Gaffney.
(Portage version: 2.1.1_pre1-r2)
Diffstat (limited to 'sys-fs/mdadm/files')
-rw-r--r--sys-fs/mdadm/files/digest-mdadm-2.5-r13
-rw-r--r--sys-fs/mdadm/files/mdadm-2.5-pointer-magic.patch35
2 files changed, 38 insertions, 0 deletions
diff --git a/sys-fs/mdadm/files/digest-mdadm-2.5-r1 b/sys-fs/mdadm/files/digest-mdadm-2.5-r1
new file mode 100644
index 000000000000..d5fea9e68ed8
--- /dev/null
+++ b/sys-fs/mdadm/files/digest-mdadm-2.5-r1
@@ -0,0 +1,3 @@
+MD5 52b7264d6d06258c77439a9ed8dee5e5 mdadm-2.5.tar.bz2 133036
+RMD160 b00da521aad2bd3e3f3e2df7192b6fd71d29ee67 mdadm-2.5.tar.bz2 133036
+SHA256 b6ec7ff2da406b09fb6231238969db334c3881c2470c3e344ae9b0a98ceabff1 mdadm-2.5.tar.bz2 133036
diff --git a/sys-fs/mdadm/files/mdadm-2.5-pointer-magic.patch b/sys-fs/mdadm/files/mdadm-2.5-pointer-magic.patch
new file mode 100644
index 000000000000..fc72667a284b
--- /dev/null
+++ b/sys-fs/mdadm/files/mdadm-2.5-pointer-magic.patch
@@ -0,0 +1,35 @@
+Clean up strict alias warnings:
+config.c: In function 'free_line':
+config.c:192: warning: dereferencing type-punned pointer will break strict-aliasing rules
+config.c:192: warning: dereferencing type-punned pointer will break strict-aliasing rules
+
+http://bugs.gentoo.org/137440
+
+--- mdadm-2.5/dlink.c
++++ mdadm-2.5/dlink.c
+@@ -8,6 +8,7 @@
+ #ifdef __dietlibc__
+ char *strncpy(char *dest, const char *src, size_t n) __THROW;
+ #endif
++#define __IN_DLINK
+ #include "dlink.h"
+
+
+--- mdadm-2.5/dlink.h
++++ mdadm-2.5/dlink.h
+@@ -12,8 +12,13 @@
+ #define dl_new(t) ((t*)dl_alloc(sizeof(t)))
+ #define dl_newv(t,n) ((t*)dl_alloc(sizeof(t)*n))
+
+-#define dl_next(p) *((void**)&(((struct __dl_head*)(p))[-1].dh_next))
+-#define dl_prev(p) *((void**)&(((struct __dl_head*)(p))[-1].dh_prev))
++#ifdef __IN_DLINK
++#define __DLINK_CAST
++#else
++#define __DLINK_CAST (void*)
++#endif
++#define dl_next(p) (__DLINK_CAST (((struct __dl_head*)(p))[-1].dh_next))
++#define dl_prev(p) (__DLINK_CAST (((struct __dl_head*)(p))[-1].dh_prev))
+
+ void *dl_head(void);
+ char *dl_strdup(char *);