Submitted By: Ken Moffat Date: 2004-04-22 Initial Package Version: 1.20 Upstream Status: This version is too specific to the new libc headers, I'll try a cleaner one later. Origin: All my own work (needs must when the devil drives) Description: Allows chrony-1.20 to compile against linux-libc-headers-2.6.4.0 - you only need/want this for BELFS (what will become LFS-6), this patch will break builds on LFS-5 or earlier. diff -Naur chrony-1.20.orig/rtc_linux.c chrony-1.20/rtc_linux.c --- chrony-1.20.orig/rtc_linux.c 2003-09-22 22:22:30.000000000 +0100 +++ chrony-1.20/rtc_linux.c 2004-04-22 12:37:04.197785544 +0100 @@ -43,12 +43,9 @@ #include #include -#ifdef HAS_SPINLOCK_H -#include -#else -/* Include dummy definition of spinlock_t to cope with earlier kernels. */ +/* Always use a dummy definition of spinlock_t */ +/* this might need to be a long on ppc and ssh ? */ typedef int spinlock_t; -#endif /* This is a complete hack since the alpha sys/io.h needs these types * but does not arrange them to be defined. This is almost certainly @@ -62,12 +59,9 @@ typedef __u64 u64; #endif -#if defined(__i386__) /* || defined(__sparc__) */ -#include -#else +/* use linux/rtc.h on ALL arches now */ #include #define RTC_UIE 0x10 /* update-finished interrupt enable */ -#endif #include #include diff -Naur chrony-1.20.orig/wrap_adjtimex.c chrony-1.20/wrap_adjtimex.c --- chrony-1.20.orig/wrap_adjtimex.c 2002-11-19 21:33:42.000000000 +0000 +++ chrony-1.20/wrap_adjtimex.c 2004-04-22 12:33:32.563958776 +0100 @@ -36,7 +36,8 @@ #define _LOOSE_KERNEL_NAMES -#include +/* Use sys/time.h directly to remove a warning */ +#include #include #include