Header cleanup on two more networking files (move libbb.h to the top and
[oweals/busybox.git] / coreutils / date.c
index c111b6161701a3e1072538193b0308f3e83065b1..a922eb96c54c94bbc70e43bfe9ae13ce8b0bf167 100644 (file)
@@ -11,7 +11,6 @@
 
 #include <stdlib.h>
 #include <errno.h>
-#include <sys/time.h>
 #include <unistd.h>
 #include <time.h>
 #include <stdio.h>
@@ -165,8 +164,7 @@ int date_main(int argc, char **argv)
 
        if(filename) {
                struct stat statbuf;
-               if(stat(filename,&statbuf))
-                       bb_perror_msg_and_die("File '%s' not found.", filename);
+               xstat(filename,&statbuf);
                tm=statbuf.st_mtime;
        } else time(&tm);
        memcpy(&tm_time, localtime(&tm), sizeof(tm_time));