From db4ab61a0cecb57558c333df089b7e5213092354 Mon Sep 17 00:00:00 2001 From: Leo Yuriev Date: Sun, 29 Oct 2017 00:56:05 +0300 Subject: [PATCH] mdbx: drop '__packed'. Change-Id: Idf3e510733adb2b12b94fe1dcd22f76e02df955b --- src/defs.h | 8 -------- test/chrono.h | 6 +++++- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/defs.h b/src/defs.h index b0721087..06886880 100644 --- a/src/defs.h +++ b/src/defs.h @@ -147,14 +147,6 @@ # endif #endif /* __fallthrough */ -#ifndef __packed -# if defined(__GNUC__) || __has_attribute(packed) -# define __packed __attribute__((packed)) -# else -# define __packed -# endif -#endif /* __packed */ - #ifndef __aligned # if defined(__GNUC__) || __has_attribute(aligned) # define __aligned(N) __attribute__((aligned(N))) diff --git a/test/chrono.h b/test/chrono.h index 4be7e46e..d5e9f658 100644 --- a/test/chrono.h +++ b/test/chrono.h @@ -20,9 +20,11 @@ namespace chrono { +#pragma pack(push, 1) + typedef union time { uint64_t fixedpoint; - struct __packed { + struct { #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ uint32_t fractional; union { @@ -42,6 +44,8 @@ typedef union time { uint32_t seconds() const { return utc; } } time; +#pragma pack(pop) + uint32_t ns2fractional(uint32_t); uint32_t fractional2ns(uint32_t); uint32_t us2fractional(uint32_t);