diff --git a/statime-linux/src/main.rs b/statime-linux/src/main.rs index 5c2610792..2497a77c5 100644 --- a/statime-linux/src/main.rs +++ b/statime-linux/src/main.rs @@ -535,7 +535,7 @@ async fn port_task( if let Some(mut timestamp) = packet.timestamp { // get_tai gives zero if this is a hardware clock, and the needed // correction when this port uses software timestamping - timestamp.seconds += clock.get_tai_offset().expect("Unable to get tai offset") as libc::time_t; + timestamp.seconds += clock.get_tai_offset().expect("Unable to get tai offset") as i64; log::trace!("Recv timestamp: {:?}", packet.timestamp); port.handle_event_receive(&event_buffer[..packet.bytes_read], timestamp_to_time(timestamp)) } else { @@ -660,7 +660,7 @@ async fn ethernet_port_task( if let Some(mut timestamp) = packet.timestamp { // get_tai gives zero if this is a hardware clock, and the needed // correction when this port uses software timestamping - timestamp.seconds += clock.get_tai_offset().expect("Unable to get tai offset") as libc::time_t; + timestamp.seconds += clock.get_tai_offset().expect("Unable to get tai offset") as i64; log::trace!("Recv timestamp: {:?}", packet.timestamp); port.handle_event_receive(&event_buffer[..packet.bytes_read], timestamp_to_time(timestamp)) } else { @@ -757,7 +757,7 @@ async fn handle_actions( // get_tai gives zero if this is a hardware clock, and the needed // correction when this port uses software timestamping time.seconds += - clock.get_tai_offset().expect("Unable to get tai offset") as libc::time_t; + clock.get_tai_offset().expect("Unable to get tai offset") as i64; log::trace!("Send timestamp {:?}", time); pending_timestamp = Some((context, timestamp_to_time(time))); } else {