aboutsummaryrefslogtreecommitdiffstats
path: root/libarchive/archive_read_support_format_cpio.c
diff options
context:
space:
mode:
authorMartin Matuska <mm@FreeBSD.org>2011-12-26 22:25:58 +0000
committerMartin Matuska <mm@FreeBSD.org>2011-12-26 22:25:58 +0000
commit7691a6970b48b047c4290c0837e91dcab450db90 (patch)
tree15e9d164982e84a4b77c51d3cea2c450f6ec4ad1 /libarchive/archive_read_support_format_cpio.c
parent4b16b4e80ed599fbac3f6e4427cd9fbb43d1ea1a (diff)
downloadsrc-7691a6970b48b047c4290c0837e91dcab450db90.tar.gz
src-7691a6970b48b047c4290c0837e91dcab450db90.zip
Update to vendor revision 3982
Notes
Notes: svn path=/vendor/libarchive/dist/; revision=228905
Diffstat (limited to 'libarchive/archive_read_support_format_cpio.c')
-rw-r--r--libarchive/archive_read_support_format_cpio.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/libarchive/archive_read_support_format_cpio.c b/libarchive/archive_read_support_format_cpio.c
index ed579b90cb37..23a2025d0954 100644
--- a/libarchive/archive_read_support_format_cpio.c
+++ b/libarchive/archive_read_support_format_cpio.c
@@ -42,6 +42,10 @@ __FBSDID("$FreeBSD: head/lib/libarchive/archive_read_support_format_cpio.c 20116
#include "archive_private.h"
#include "archive_read_private.h"
+#ifdef _MSC_VER
+#define __packed
+#pragma pack(push, 1)
+#endif
struct cpio_bin_header {
unsigned char c_magic[2];
unsigned char c_dev[2];
@@ -54,7 +58,7 @@ struct cpio_bin_header {
unsigned char c_mtime[4];
unsigned char c_namesize[2];
unsigned char c_filesize[4];
-};
+} __packed;
struct cpio_odc_header {
char c_magic[6];
@@ -68,7 +72,7 @@ struct cpio_odc_header {
char c_mtime[11];
char c_namesize[6];
char c_filesize[11];
-};
+} __packed;
struct cpio_newc_header {
char c_magic[6];
@@ -85,7 +89,12 @@ struct cpio_newc_header {
char c_rdevminor[8];
char c_namesize[8];
char c_crc[8];
-};
+} __packed;
+
+#ifdef _MSC_VER
+#undef __packed
+#pragma pack(pop)
+#endif
struct links_entry {
struct links_entry *next;