From bf57222e966f7ea50df469077795fffe2023cbf7 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Tue, 15 Sep 2015 18:43:43 +0200 Subject: [PATCH] sys: use timex driver on FreeBSD Switch from the SunOS adjtime() based driver to the timex driver. There is no FreeBSD-specific code, so call SYS_Timex_Initialise() and SYS_Timex_Finalise() directly from sys.c. --- configure | 11 ++++------- sys.c | 6 ++++++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/configure b/configure index c634711..dada090 100755 --- a/configure +++ b/configure @@ -410,13 +410,10 @@ case $SYSTEM in fi ;; - BSD/386-i[3456]86|FreeBSD-i386|FreeBSD-amd64 ) - # Antti Jrvinen reported that this system can - # be supported with the SunOS 4.x driver files. - EXTRA_OBJECTS="sys_sunos.o strerror.o" - EXTRA_LIBS="-lkvm" - add_def SUNOS - echo "Configuring for $SYSTEM (using SunOS driver)" + FreeBSD-i386|FreeBSD-amd64 ) + EXTRA_OBJECTS="sys_generic.o sys_timex.o" + add_def FREEBSD + echo "Configuring for $SYSTEM" ;; NetBSD-* ) EXTRA_OBJECTS="sys_generic.o sys_netbsd.o sys_timex.o" diff --git a/sys.c b/sys.c index 4d1c035..c9aa57d 100644 --- a/sys.c +++ b/sys.c @@ -42,6 +42,8 @@ #include "sys_netbsd.h" #elif defined(MACOSX) #include "sys_macosx.h" +#elif defined(FREEBSD) +#include "sys_timex.h" #endif /* ================================================== */ @@ -59,6 +61,8 @@ SYS_Initialise(void) SYS_NetBSD_Initialise(); #elif defined(MACOSX) SYS_MacOSX_Initialise(); +#elif defined(FREEBSD) + SYS_Timex_Initialise(); #else #error Unknown system #endif @@ -79,6 +83,8 @@ SYS_Finalise(void) SYS_NetBSD_Finalise(); #elif defined(MACOSX) SYS_MacOSX_Finalise(); +#elif defined(FREEBSD) + SYS_Timex_Finalise(); #else #error Unknown system #endif