mdbx: fix #pragma pack to avoid misalignment for some compilers.

Fixes https://github.com/erthink/libmdbx/issues/235.
This commit is contained in:
Leonid Yuriev 2021-10-09 12:36:40 +03:00
parent ee917209fe
commit 64e6fa93fd
3 changed files with 2 additions and 6 deletions

View File

@ -437,7 +437,7 @@ typedef uint16_t indx_t;
/*----------------------------------------------------------------------------*/
/* Core structures for database and shared memory (i.e. format definition) */
#pragma pack(push, 1)
#pragma pack(push, 4)
/* Information about a single database in the environment. */
typedef struct MDBX_db {

View File

@ -19,7 +19,7 @@
namespace chrono {
#pragma pack(push, 1)
#pragma pack(push, 4)
typedef union time {
uint64_t fixedpoint;

View File

@ -135,8 +135,6 @@ inline bool parse_option_intptr(int argc, char *const argv[], int &narg,
//-----------------------------------------------------------------------------
#pragma pack(push, 1)
struct keygen_params_pod {
/* Параметры генератора пар key-value. Также может быть полезным описание
* алгоритма генерации в keygen.h
@ -307,8 +305,6 @@ struct actor_config_pod {
wait4id(wait4id) {}
};
#pragma pack(pop)
extern const struct option_verb mode_bits[];
extern const struct option_verb table_bits[];
void dump(const char *title = "config-dump: ");