]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Fix build failure using __packed on MSVC.
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Sat, 24 Dec 2011 12:54:52 +0000 (07:54 -0500)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Sat, 24 Dec 2011 12:54:52 +0000 (07:54 -0500)
SVN-Revision: 3981

libarchive/archive_read_support_format_cpio.c

index a24c5d320867a73723591698c3eb589f5b4d2167..23a2025d0954c5e6e157a367b3ed4fd8391aa0a6 100644 (file)
@@ -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];
@@ -87,6 +91,11 @@ struct cpio_newc_header {
        char    c_crc[8];
 } __packed;
 
+#ifdef _MSC_VER
+#undef __packed
+#pragma pack(pop)
+#endif
+
 struct links_entry {
         struct links_entry      *next;
         struct links_entry      *previous;