Xilinx-CNS / sfptpd

Solarflare Enhanced PTP Daemon. Use multiple PTP and PPS sources and sync local clocks together in one integrated application with high quality timestamp filtering, supporting bonds and VLANs, real time and long term stats reporting.
Other
25 stars 4 forks source link

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

Closed abower-amd closed 9 months ago

abower-amd commented 9 months ago

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);
          |                                                                     ~~~~~~~~~~~~~~^~~~~