blob: 6d0c2fcefaacdf445b73e57738f1f9a7b1db430d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
--- /tmp/cmos.c 2006-11-21 11:38:55.000000000 +0100
+++ util-linux-2.12r/hwclock/cmos.c 2006-11-21 11:41:45.458554000 +0100
@@ -46,15 +46,16 @@
#include <unistd.h> /* for geteuid() */
#include <fcntl.h> /* for O_RDWR */
+#include <linux/version.h>
#include <errno.h>
#include "../defines.h" /* for HAVE_sys_io_h */
#include "nls.h"
#if defined(__i386__)
-#ifdef HAVE_sys_io_h
-#include <sys/io.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
+#include <asm/io.h>
#else
-#include <asm/io.h> /* for inb, outb */
+#include <sys/io.h> /* for inb, outb */
#endif
#elif defined(__alpha__)
/* <asm/io.h> fails to compile, probably because of u8 etc */
|