]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix unused variable compile warning for kernel timestamps in
authorGeorge Thessalonikefs <george@nlnetlabs.nl>
Fri, 28 Jul 2023 18:17:07 +0000 (20:17 +0200)
committerGeorge Thessalonikefs <george@nlnetlabs.nl>
Fri, 28 Jul 2023 18:17:07 +0000 (20:17 +0200)
  netevent.c

doc/Changelog
util/netevent.c

index 134caab8a510e54412647c6804d190547c492897..c49cee6cb9c143acce8a34963562496c7513373e 100644 (file)
@@ -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.
index 75bbae35c019264e6abd2827e340db7e35e3d40e..f9f9fc1163c5c974eac3c1d2dea8d709ce78a793 100644 (file)
@@ -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 */
                        }
                }