[vlc-devel] [PATCH] vlc_codecs.h: separare the MSVC and MS clang packing
Steve Lhomme
robux4 at videolabs.io
Mon Jul 11 13:34:58 CEST 2016
needed when using cl.exe when configure was ran with clang.exe
---
include/vlc_codecs.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/vlc_codecs.h b/include/vlc_codecs.h
index cdac8b6..ad72e4a 100644
--- a/include/vlc_codecs.h
+++ b/include/vlc_codecs.h
@@ -45,11 +45,11 @@ typedef struct _GUID
typedef GUID guid_t;
-#ifdef HAVE_ATTRIBUTE_PACKED
-# define ATTR_PACKED __attribute__((__packed__))
-#elif defined(__SUNPRO_C) || defined(_MSC_VER)
+#if defined(__SUNPRO_C) || (defined(_MSC_VER) && !defined(__clang__))
# pragma pack(1)
# define ATTR_PACKED
+#elif defined(HAVE_ATTRIBUTE_PACKED)
+# define ATTR_PACKED __attribute__((__packed__))
#elif defined(__APPLE__)
# pragma pack(push, 1)
# define ATTR_PACKED
@@ -210,7 +210,7 @@ ATTR_PACKED
} VIDEOINFO;
#endif
-#if defined(__SUNPRO_C) || defined(_MSC_VER)
+#if defined(__SUNPRO_C) || (defined(_MSC_VER) && !defined(__clang__))
# pragma pack()
#elif defined(__APPLE__) && !HAVE_ATTRIBUTE_PACKED
# pragma pack(pop)
--
2.8.2
More information about the vlc-devel
mailing list