]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
hwclock: include-what-you-use header check
authorSami Kerola <kerolasa@iki.fi>
Sun, 24 Jul 2011 17:58:17 +0000 (19:58 +0200)
committerSami Kerola <kerolasa@iki.fi>
Tue, 26 Jul 2011 15:28:52 +0000 (17:28 +0200)
One deletion, few adds and sort to include lists.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
hwclock/cmos.c
hwclock/hwclock.c
hwclock/kd.c
hwclock/rtc.c

index d6216717f377171f3e25d140986bf4f69603a8e0..8c4ccbe0d908189796fb01c2c9ed4a3e1b059f6a 100644 (file)
  *   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__)
index 0c6b0f6cd4fde156ffcb48076da3da3f62e8c7f6..3211b8f8ea77c11c322dc33d9c57b496c4ab3de5 100644 (file)
  *     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"
 
index f4957ac6444cae20d8ef8e475db7c5f7d5105a62..62643178e870c31bb53dd1b189cedee7e800c0c8 100644 (file)
@@ -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;
index 21c7d746d8eb72cdf69947e64e9c57f1793db4d6..a76b95c6532027da978af10adac0017d51bb2e0c 100644 (file)
@@ -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"