aboutsummaryrefslogtreecommitdiff
path: root/coreutils/touch.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/touch.c')
-rw-r--r--coreutils/touch.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/coreutils/touch.c b/coreutils/touch.c
index 7d1bf0d9e..f670b7f6e 100644
--- a/coreutils/touch.c
+++ b/coreutils/touch.c
@@ -40,6 +40,9 @@
40int touch_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 40int touch_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
41int touch_main(int argc UNUSED_PARAM, char **argv) 41int touch_main(int argc UNUSED_PARAM, char **argv)
42{ 42{
43 int fd;
44 int status = EXIT_SUCCESS;
45 int opts;
43#if ENABLE_DESKTOP 46#if ENABLE_DESKTOP
44# if ENABLE_LONG_OPTS 47# if ENABLE_LONG_OPTS
45 static const char touch_longopts[] ALIGN1 = 48 static const char touch_longopts[] ALIGN1 =
@@ -49,17 +52,15 @@ int touch_main(int argc UNUSED_PARAM, char **argv)
49 "date\0" Required_argument "d" 52 "date\0" Required_argument "d"
50 ; 53 ;
51# endif 54# endif
52 struct timeval timebuf = {.tv_usec = 0};
53 char *reference_file = NULL; 55 char *reference_file = NULL;
54 char *date_str = NULL; 56 char *date_str = NULL;
57 struct timeval timebuf;
58 timebuf.tv_usec = 0;
55#else 59#else
56# define reference_file NULL 60# define reference_file NULL
57# define date_str NULL 61# define date_str NULL
58# define timebuf (*(struct timeval*)NULL) 62# define timebuf (*(struct timeval*)NULL)
59#endif 63#endif
60 int fd;
61 int status = EXIT_SUCCESS;
62 int opts;
63 64
64#if ENABLE_DESKTOP && ENABLE_LONG_OPTS 65#if ENABLE_DESKTOP && ENABLE_LONG_OPTS
65 applet_long_options = touch_longopts; 66 applet_long_options = touch_longopts;