be32toh() returns uint32_t, and m->trans_time.tv_nsec is defined as long in struct timespec.
Let's add a cast to avoid the warning.
Fixes #7789.
/* check our "time cookie" (we just stored nanoseconds in the fraction field) */
if (be32toh(ntpmsg.origin_time.sec) != m->trans_time.tv_sec + OFFSET_1900_1970 ||
- be32toh(ntpmsg.origin_time.frac) != m->trans_time.tv_nsec) {
+ be32toh(ntpmsg.origin_time.frac) != (unsigned long) m->trans_time.tv_nsec) {
log_debug("Invalid reply; not our transmit time. Ignoring.");
return 0;
}