blob: e6579cd417070232a6934915e9d72a54443701ff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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 */
{
|