Xilinx-CNS/sfptpd

i386: 32-bit builds fail due to time_t not being 64-bit

Closed this issue · 0 comments

32-bit builds fail with errors like:

    src/sfptpd_statistics.c: In function ‘stats_range_history_write_data’:
    src/sfptpd_statistics.c:518:62: error: passing argument 4 of ‘sfptpd_local_strftime’ from incompatible pointer type [-Werror=incompatible-pointer-types]
      518 |                                               "%Y-%m-%d %X", &entry->min_time.sec);
          |                                                              ^~~~~~~~~~~~~~~~~~~~
          |                                                              |
          |                                                              int64_t * {aka long long int *}
    In file included from src/include/sfptpd_logging.h:16,
                     from src/sfptpd_statistics.c:20:
    src/include/sfptpd_misc.h:144:83: note: expected ‘const time_t *’ {aka ‘const long int *’} but argument is of type ‘int64_t *’ {aka ‘long long int *’}
      144 | void sfptpd_local_strftime(char *s, size_t max, const char *format, const time_t *timep);
          |                                                                     ~~~~~~~~~~~~~~^~~~~