summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-01-17 17:57:05 +0000
committerMike Frysinger <vapier@gentoo.org>2009-01-17 17:57:05 +0000
commitd6a62224ae9f72268ddc794caeae66ec1be07b49 (patch)
tree79cdd76d0f991cd01433c52ff2d19c3d4101eb5b /app-arch/cpio/files
parentold (diff)
downloadgentoo-2-d6a62224ae9f72268ddc794caeae66ec1be07b49.tar.gz
gentoo-2-d6a62224ae9f72268ddc794caeae66ec1be07b49.tar.bz2
gentoo-2-d6a62224ae9f72268ddc794caeae66ec1be07b49.zip
Add fix from Debian for struct packing (i.e. arm) #255096 by Raúl Porcel.
(Portage version: 2.2_rc20/cvs/Linux 2.6.28 x86_64)
Diffstat (limited to 'app-arch/cpio/files')
-rw-r--r--app-arch/cpio/files/cpio-2.9-packed.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/app-arch/cpio/files/cpio-2.9-packed.patch b/app-arch/cpio/files/cpio-2.9-packed.patch
new file mode 100644
index 000000000000..e6579cd41707
--- /dev/null
+++ b/app-arch/cpio/files/cpio-2.9-packed.patch
@@ -0,0 +1,34 @@
+http://bugs.debian.org/438155
+
+force structures that are overlaid on files via mmap to be packed so that
+alignment doesnt screw up the offsets
+
+--- cpio-2.9/src/cpiohdr.h
++++ cpio-2.9/src/cpiohdr.h
+@@ -35,7 +35,7 @@
+ unsigned short c_mtimes[2];
+ unsigned short c_namesize;
+ unsigned short c_filesizes[2];
+-};
++} __attribute__((packed));
+
+ struct old_ascii_header
+ {
+@@ -50,7 +50,7 @@
+ char c_mtime[11];
+ char c_namesize[6];
+ char c_filesize[11];
+-};
++} __attribute__((packed));
+
+ /* "New" portable format and CRC format:
+
+@@ -80,7 +80,7 @@
+ char c_namesize[8]; /* count includes terminating NUL in pathname */
+ char c_chksum[8]; /* 0 for "new" portable format; for CRC format
+ the sum of all the bytes in the file */
+-};
++} __attribute__((packed));
+
+ struct cpio_file_stat /* Internal representation of a CPIO header */
+ {