[git commit] Fix ntpd compilcation on the FreeBSD

Denys Vlasenko vda.linux at googlemail.com
Mon Jan 4 12:28:28 UTC 2021


commit: https://git.busybox.net/busybox/commit/?id=f1baa4a6b4239cff069aa0b257365b12fb6ee130
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master

FreeBSD using different constant names, defining them inline

Signed-off-by: Alex Samorukov <samm at os2.kiev.ua>
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 networking/ntpd.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/networking/ntpd.c b/networking/ntpd.c
index 46d8f3495..1f17b08ef 100644
--- a/networking/ntpd.c
+++ b/networking/ntpd.c
@@ -113,6 +113,13 @@
 # define IPTOS_DSCP_AF21 0x48
 #endif
 
+#if defined(__FreeBSD__)
+/* see sys/timex.h */
+# define adjtimex ntp_adjtime
+# define ADJ_OFFSET     MOD_OFFSET
+# define ADJ_STATUS     MOD_STATUS
+# define ADJ_TIMECONST  MOD_TIMECONST
+#endif
 
 /* Verbosity control (max level of -dddd options accepted).
  * max 6 is very talkative (and bloated). 3 is non-bloated,


More information about the busybox-cvs mailing list