From 373904f865dca4614170c76b97115b7e5177791e Mon Sep 17 00:00:00 2001 From: George Thessalonikefs Date: Fri, 28 Jul 2023 20:17:07 +0200 Subject: [PATCH] - Fix unused variable compile warning for kernel timestamps in netevent.c --- doc/Changelog | 4 ++++ util/netevent.c | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/Changelog b/doc/Changelog index 134caab8a..c49cee6cb 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,7 @@ +28 July 2023: George + - Fix unused variable compile warning for kernel timestamps in + netevent.c + 21 July 2023: George - Merge #857 from eaglegai: fix potential memory leaks when errors happen. diff --git a/util/netevent.c b/util/netevent.c index 75bbae35c..f9f9fc116 100644 --- a/util/netevent.c +++ b/util/netevent.c @@ -846,7 +846,9 @@ comm_point_udp_ancil_callback(int fd, short event, void* arg) #ifndef S_SPLINT_S struct cmsghdr* cmsg; #endif /* S_SPLINT_S */ +#ifdef HAVE_LINUX_NET_TSTAMP_H struct timespec *ts; +#endif /* HAVE_LINUX_NET_TSTAMP_H */ rep.c = (struct comm_point*)arg; log_assert(rep.c->type == comm_udp); @@ -921,7 +923,7 @@ comm_point_udp_ancil_callback(int fd, short event, void* arg) } else if( cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SO_TIMESTAMP) { memmove(&rep.c->recv_tv, CMSG_DATA(cmsg), sizeof(struct timeval)); -#endif +#endif /* HAVE_LINUX_NET_TSTAMP_H */ } } -- 2.47.3