basic: add a size check to format timex members properly
As of glibc-2.34, the size of members in struct timex varies depending on the _TIME_BITS macro. Fixes: https://github.com/systemd/systemd/issues/21826
This commit is contained in:
committed by
Yu Watanabe
parent
b9f27a0567
commit
9a723ed6e8
@@ -26,10 +26,12 @@ assert_cc(sizeof(gid_t) == sizeof(uint32_t));
|
||||
# error Unknown time_t size
|
||||
#endif
|
||||
|
||||
#if defined __x86_64__ && defined __ILP32__
|
||||
#if SIZEOF_TIMEX_MEMBER == 8
|
||||
# define PRI_TIMEX PRIi64
|
||||
#else
|
||||
#elif SIZEOF_TIMEX_MEMBER == 4
|
||||
# define PRI_TIMEX "li"
|
||||
#else
|
||||
# error Unknown timex member size
|
||||
#endif
|
||||
|
||||
#if SIZEOF_RLIM_T == 8
|
||||
|
||||
Reference in New Issue
Block a user