diff options
author | Sami Kerola | 2011-07-24 19:58:17 +0200 |
---|---|---|
committer | Sami Kerola | 2011-07-26 17:28:52 +0200 |
commit | 998f392a1f7206282084e6df90cba4007cceea13 (patch) | |
tree | 9ed666c54ac171967707382b40f4cccf5a3b529b | |
parent | hwclock: coding style clean up (diff) | |
download | kernel-qcow2-util-linux-998f392a1f7206282084e6df90cba4007cceea13.tar.gz kernel-qcow2-util-linux-998f392a1f7206282084e6df90cba4007cceea13.tar.xz kernel-qcow2-util-linux-998f392a1f7206282084e6df90cba4007cceea13.zip |
hwclock: include-what-you-use header check
One deletion, few adds and sort to include lists.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
-rw-r--r-- | hwclock/cmos.c | 9 | ||||
-rw-r--r-- | hwclock/hwclock.c | 18 | ||||
-rw-r--r-- | hwclock/kd.c | 7 | ||||
-rw-r--r-- | hwclock/rtc.c | 11 |
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" |