diff options
author | Karel Zak | 2006-12-07 00:26:22 +0100 |
---|---|---|
committer | Karel Zak | 2006-12-07 00:26:22 +0100 |
commit | 0b0bb92085fc7a7e7d2afe984e43161a2f4ec140 (patch) | |
tree | e560f6b005f0e83713e8259f2f12806dd8d39ec6 /hwclock | |
parent | Imported from util-linux-2.12h tarball. (diff) | |
download | kernel-qcow2-util-linux-0b0bb92085fc7a7e7d2afe984e43161a2f4ec140.tar.gz kernel-qcow2-util-linux-0b0bb92085fc7a7e7d2afe984e43161a2f4ec140.tar.xz kernel-qcow2-util-linux-0b0bb92085fc7a7e7d2afe984e43161a2f4ec140.zip |
Imported from util-linux-2.12i tarball.
Diffstat (limited to 'hwclock')
-rw-r--r-- | hwclock/cmos.c | 6 | ||||
-rw-r--r-- | hwclock/kd.c | 16 |
2 files changed, 18 insertions, 4 deletions
diff --git a/hwclock/cmos.c b/hwclock/cmos.c index a5eec0372..8d497b27e 100644 --- a/hwclock/cmos.c +++ b/hwclock/cmos.c @@ -46,11 +46,15 @@ #include <unistd.h> /* for geteuid() */ #include <fcntl.h> /* for O_RDWR */ - +#include "../defines.h" /* for HAVE_sys_io_h */ #include "nls.h" #if defined(__i386__) +#ifdef HAVE_sys_io_h +#include <sys/io.h> +#else #include <asm/io.h> /* for inb, outb */ +#endif #elif defined(__alpha__) /* <asm/io.h> fails to compile, probably because of u8 etc */ extern unsigned int inb(unsigned long port); diff --git a/hwclock/kd.c b/hwclock/kd.c index dbbe758f4..cac767888 100644 --- a/hwclock/kd.c +++ b/hwclock/kd.c @@ -1,4 +1,15 @@ -/* kd.c - KDGHWCLK stuff, possibly m68k only */ +/* kd.c - KDGHWCLK stuff, possibly m68k only - deprecated */ +#ifndef __m68k__ + +#include "clock.h" + +struct clock_ops * +probe_for_kd_clock() { + return NULL; +} + +#else /* __m68k__ */ + #include <unistd.h> /* for close() */ #include <fcntl.h> /* for O_RDONLY */ #include <sysexits.h> @@ -162,9 +173,7 @@ probe_for_kd_clock() { } if (con_fd < 0) { /* probably KDGHWCLK exists on m68k only */ -#ifdef __m68k__ outsyserr(_("Can't open /dev/tty1 or /dev/vc/1")); -#endif } else { if (ioctl(con_fd, KDGHWCLK, &t) == -1) { if (errno != EINVAL) @@ -174,3 +183,4 @@ probe_for_kd_clock() { } return ret; } +#endif /* __m68k__ */ |