]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Follow up with r3981 fixing __packed keyword on MSVC.
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Sat, 24 Dec 2011 13:06:48 +0000 (08:06 -0500)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Sat, 24 Dec 2011 13:06:48 +0000 (08:06 -0500)
SVN-Revision: 3982

libarchive/archive_write_set_format_cpio.c

index 4ca1d84cada73b9a52a1af4204bbd88072618495..b64b1cb06e275fa12b7dd75c6e38021d599022d0 100644 (file)
@@ -62,6 +62,11 @@ struct cpio {
        size_t            ino_list_next;
 };
 
+#ifdef _MSC_VER
+#define __packed
+#pragma pack(push, 1)
+#endif
+
 struct cpio_header {
        char    c_magic[6];
        char    c_dev[6];
@@ -76,6 +81,11 @@ struct cpio_header {
        char    c_filesize[11];
 } __packed;
 
+#ifdef _MSC_VER
+#undef __packed
+#pragma pack(pop)
+#endif
+
 /*
  * Set output format to 'cpio' format.
  */