]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
timesync,test: explicitly include sys/timex.h when struct timex is used 38100/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 7 Jul 2025 03:40:11 +0000 (12:40 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 7 Jul 2025 03:44:18 +0000 (12:44 +0900)
struct timex is defined by sys/timex.h -> bits/timex.h.
Glibc includes the header in time.h, but let's explicitly include it
when the struct is used.

Similar to 4f18ff2e29b8054f30b084abcabf5f689f4b340b, but for sys/timex.h.

src/test/test-sizeof.c
src/timesync/timesyncd-manager.c

index f4c9916f15d8507f0150171886c2753cb644d454..075cc8c5a0c851ad60c997c6fb9d7240ba9d5f17 100644 (file)
@@ -7,6 +7,7 @@
 #include <string.h>
 #include <sys/resource.h>
 #include <sys/socket.h>
+#include <sys/timex.h>
 
 #define __STDC_WANT_IEC_60559_TYPES_EXT__
 #include <float.h>
index 031793ea7748cc26a854f394872b1c309d3a87f8..012b61d5130549166975f9bb988532551add73a0 100644 (file)
@@ -5,6 +5,7 @@
 #include <netinet/in.h>
 #include <netinet/ip.h>
 #include <resolv.h>
+#include <sys/timex.h>
 #include <unistd.h>
 
 #include "sd-bus.h"