Closed micmac1 closed 6 months ago
Just for comparison, after applying this patch:
checking for uint64_t... yes
checking size of int... (cached) 4
checking size of long int... (cached) 4
checking size of long long int... 8
checking size of time_t... 8
And config.h content:
/* printf format for time_t */
#define PRI_time_t "lld"
/* The size of `int', as computed by sizeof. */
#define SIZEOF_INT 4
/* The size of `long int', as computed by sizeof. */
#define SIZEOF_LONG_INT 4
/* The size of `long long int', as computed by sizeof. */
#define SIZEOF_LONG_LONG_INT 8
/* The size of `time_t', as computed by sizeof. */
#define SIZEOF_TIME_T 8
LGTM. Thanks!
Hi all,
I was getting ready to bump the OpenWrt package to the latest git, only to find this error:
We've seen similar issues in the past in OpenWrt, after musl was updated to 1.2.
Some libc implementations are shifting toward using 64-bit time_t for all arches to solve the year 2038 problem. musl is one of them, see [1].
So when compiling for a 32-bit arch time_t will be long long. This commit adds this option.
[1] https://musl.libc.org/time64.html