chrony-1.20-kernel-headers-1.patch

Ken Moffat ken at kenmoffat.uklinux.net
Thu Apr 22 15:12:32 PDT 2004


Submitted by: Ken Moffat <ken at kenmoffat.uklinux.net>
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 <sys/time.h>
 #include <sys/types.h>

-#ifdef HAS_SPINLOCK_H
-#include <linux/spinlock.h>
-#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 <linux/mc146818rtc.h>
-#else
+/* use linux/rtc.h on ALL arches now */
 #include <linux/rtc.h>
 #define RTC_UIE 0x10		/* update-finished interrupt enable */
-#endif

 #include <sys/ioctl.h>
 #include <fcntl.h>
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 <linux/time.h>
+/* Use sys/time.h directly to remove a warning */
+#include <sys/time.h>
 #include <linux/timex.h>
 #include <asm/param.h>


-- 
 das eine Mal als Tragödie, das andere Mal als Farce




More information about the patches mailing list