pragma packing

This commit is contained in:
2026-04-10 16:36:37 +02:00
parent 24f20c81f8
commit eb7c29abb1
2 changed files with 4 additions and 0 deletions

View File

@@ -9,6 +9,7 @@
#include <string.h>
#include <stdlib.h>
#pragma pack(push, 1) // Ensure no padding for consistent file storage
typedef struct {
uint64_t blockNumber;
uint64_t timestamp;
@@ -19,6 +20,7 @@ typedef struct {
uint8_t version;
uint8_t reserved[3]; // 3 bytes (Explicit padding for 8-byte alignment)
} block_header_t;
#pragma pack(pop)
typedef struct {
block_header_t header;