Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/common/attributes.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/common/attributes.h b/include/common/attributes.h
index 64df445..4ccc421 100644
--- a/include/common/attributes.h
+++ b/include/common/attributes.h
@@ -178,4 +178,10 @@ static inline int clzll(const unsigned long long mask) {
static_assert(name == offsetof(type, field), #field)
#endif
+#ifdef _MSC_VER
+#define PACKED(...) __pragma(pack(push, 1)) __VA_ARGS__ __pragma(pack(pop))
+#else
+#define PACKED(...) __VA_ARGS__ __attribute__((__packed__))
+#endif
+
#endif /* DAV1D_COMMON_ATTRIBUTES_H */