summaryrefslogtreecommitdiff
path: root/debian/patches/sha1-includes.diff
diff options
context:
space:
mode:
authorMichael Tokarev <mjt@tls.msk.ru>2014-12-20 08:48:44 +0000
committerMichael Tokarev <mjt@tls.msk.ru>2014-12-20 08:48:44 +0000
commit489bea7ee8e1dbecfa517b8415568044ab57c73a (patch)
tree44d4878d4c7da3f4908ea9a765ef9b8f9c141756 /debian/patches/sha1-includes.diff
mdadm (3.3.2-5) unstable; urgency=medium
* use-tempnode-not-devnode.patch: change udev rules file to use $tempnode which works both on wheezy and jessie udev, instead of $devnode which only works in jessie. At this stage it is better to make rules file compatible with old version instead of adding versioned dependency. Should be removed for jessie+1. (Closes: #770883) * fix Closes: list in previous entry (Closes: #771852) # imported from the archive
Diffstat (limited to 'debian/patches/sha1-includes.diff')
-rw-r--r--debian/patches/sha1-includes.diff40
1 files changed, 40 insertions, 0 deletions
diff --git a/debian/patches/sha1-includes.diff b/debian/patches/sha1-includes.diff
new file mode 100644
index 00000000..0dfd7daf
--- /dev/null
+++ b/debian/patches/sha1-includes.diff
@@ -0,0 +1,40 @@
+From: Michael Tokarev <mjt@tls.msk.ru>
+Subject: do not #include ansidecl.h from sha1.h, use system headers
+
+In 3.2.5 version of mdadm, new sha1 implementation has been included
+which tries to include ansidecl.h header which is internal to some
+other project. But this #include isn't really necessary, since this
+implementation does not actually use any defines from ansidecl.h. So
+just remove the #include, instead of adding a new external dependency.
+
+References: http://www.spinics.net/lists/raid/msg38859.html
+
+While at it, unconditionally include system headers like limits.h and
+stdint.h, since on a Linux system these headers are available, and
+these contains definitive information about real system types than
+any guesses.
+
+--- a/sha1.h
++++ b/sha1.h
+@@ -22,7 +22,7 @@
+
+ #include <stdio.h>
+
+-#if defined HAVE_LIMITS_H || _LIBC
++#if 1 /* defined HAVE_LIMITS_H || _LIBC */
+ # include <limits.h>
+ #endif
+
+@@ -33,9 +33,9 @@
+ the resulting executable. Locally running cross-compiled executables
+ is usually not possible. */
+
+-#ifdef _LIBC
+-# include <sys/types.h>
+-typedef u_int32_t sha1_uint32;
++#if 1 /* def _LIBC */
++# include <stdint.h>
++typedef uint32_t sha1_uint32;
+ typedef uintptr_t sha1_uintptr;
+ #else
+ # define INT_MAX_32_BITS 2147483647