From: Michihiro NAKAJIMA Date: Sat, 24 Dec 2011 13:06:48 +0000 (-0500) Subject: Follow up with r3981 fixing __packed keyword on MSVC. X-Git-Tag: v3.0.4~2^2~169^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d049c4848dd4d6efd3bcc3fc4122d4defae47a23;p=thirdparty%2Flibarchive.git Follow up with r3981 fixing __packed keyword on MSVC. SVN-Revision: 3982 --- diff --git a/libarchive/archive_write_set_format_cpio.c b/libarchive/archive_write_set_format_cpio.c index 4ca1d84ca..b64b1cb06 100644 --- a/libarchive/archive_write_set_format_cpio.c +++ b/libarchive/archive_write_set_format_cpio.c @@ -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. */