summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hwclock/cmos.c9
-rw-r--r--hwclock/hwclock.c18
-rw-r--r--hwclock/kd.c7
-rw-r--r--hwclock/rtc.c11
4 files changed, 28 insertions, 17 deletions
diff --git a/hwclock/cmos.c b/hwclock/cmos.c
index d6216717f..8c4ccbe0d 100644
--- a/hwclock/cmos.c
+++ b/hwclock/cmos.c
@@ -45,9 +45,14 @@
* tm_isdst >0: yes, 0: no, <0: unknown
*/
-#include <unistd.h> /* for geteuid() */
-#include <fcntl.h> /* for O_RDWR */
#include <errno.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <string.h>
+#include <time.h>
+#include <unistd.h>
+
+#include "c.h"
#include "nls.h"
#if defined(__i386__)
diff --git a/hwclock/hwclock.c b/hwclock/hwclock.c
index 0c6b0f6cd..3211b8f8e 100644
--- a/hwclock/hwclock.c
+++ b/hwclock/hwclock.c
@@ -57,19 +57,19 @@
* f) put the command 'clock -au' or 'clock -a' in your '/etc/rc.local'
*/
-#include <string.h>
-#include <stdio.h>
-#include <fcntl.h>
#include <errno.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <time.h>
-#include <sys/time.h>
-#include <sys/stat.h>
-#include <stdarg.h>
#include <getopt.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#include <sysexits.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <time.h>
+#include <unistd.h>
+#include "c.h"
#include "clock.h"
#include "nls.h"
diff --git a/hwclock/kd.c b/hwclock/kd.c
index f4957ac64..62643178e 100644
--- a/hwclock/kd.c
+++ b/hwclock/kd.c
@@ -2,15 +2,15 @@
* kd.c - KDGHWCLK stuff, possibly m68k only, likely to be deprecated
*/
-#include "clock.h"
#ifdef __m68k__
-# include <unistd.h> /* for close() */
-# include <fcntl.h> /* for O_RDONLY */
+# include <fcntl.h>
# include <sysexits.h>
# include <sys/ioctl.h>
+# include <unistd.h>
+# include "clock.h"
# include "nls.h"
# include "usleep.h"
@@ -23,6 +23,7 @@
#if !defined(__m68k__) || !defined(KDGHWCLK)
+#include <stddef.h>
struct clock_ops *probe_for_kd_clock()
{
return NULL;
diff --git a/hwclock/rtc.c b/hwclock/rtc.c
index 21c7d746d..a76b95c65 100644
--- a/hwclock/rtc.c
+++ b/hwclock/rtc.c
@@ -1,12 +1,17 @@
/*
* rtc.c - Use /dev/rtc for clock access
*/
-#include <unistd.h> /* for close() */
-#include <fcntl.h> /* for O_RDONLY */
+#include <asm/ioctl.h>
#include <errno.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
#include <sysexits.h>
#include <sys/ioctl.h>
-#include <sys/time.h> /* for struct timeval */
+#include <sys/select.h>
+#include <sys/time.h>
+#include <time.h>
+#include <unistd.h>
#include "clock.h"
#include "nls.h"