I have a structure like below:
typedef struct ERROR_LOG_EVENT
{
time_t time;
uint32_t count;
int32_t error_type;
} ERROR_LOG_EVENT;
I am storing this structure on a non-volatile memory.
On 32-bit system, everything works fine as time_t
is 4 bytes(32bit) in width.
But on 64-bit system time_t
becomes 8bytes(64bit) wide.
Is there a way to store time in 4byte(32bit)
on 64bit system?
Can I replace time_t time
member of the above structure with something that always is guaranteed to be 32-bit ?