sfptpd
sfptpd copied to clipboard
y2038: build fails with -D_TIME_BITS=64 for 32-bit targets
CFLAGS="-D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 -m32" LDFLAGS=-m32 make -k -j4
src/sfptpd_logging.c: In function ‘sfptpd_log_get_time’:
src/sfptpd_logging.c:1080:63: error: format ‘%ld’ expects argument of type ‘long int’, but argument 5 has type ‘__suseconds64_t’ {aka ‘long long int’} [-
Werror=format=]
1080 | rc = snprintf(time->time, sizeof(time->time), "%s.%06ld", temp, now.tv_usec);
| ~~~~^ ~~~~~~~~~~~
| | |
| long int __suseconds64_t {aka long long int}
| %06lld
src/ptp/ptpd2/dep/msg.c: In function ‘msgDump’:
src/ptp/ptpd2/dep/msg.c:3037:46: error: format ‘%ld’ expects argument of type ‘long int’, but argument 5 has type ‘__suseconds64_t’ {aka ‘long long int’} [-Werror=format=]
3037 | snprintf(time, sizeof(time), "%s.%06ld", temp, now.tv_usec);
| ~~~~^ ~~~~~~~~~~~
| | |
| long int __suseconds64_t {aka long long int}
| %06lld