projects
/
platform
/
upstream
/
coreutils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Include stat-time.h, and use its functions instead of the obsolete
[platform/upstream/coreutils.git]
/
src
/
date.c
diff --git
a/src/date.c
b/src/date.c
index
ebe63ac
..
af9485b
100644
(file)
--- a/
src/date.c
+++ b/
src/date.c
@@
-33,6
+33,7
@@
#include "inttostr.h"
#include "posixtm.h"
#include "quote.h"
#include "inttostr.h"
#include "posixtm.h"
#include "quote.h"
+#include "stat-time.h"
#include "fprintftime.h"
/* The official name of this program (e.g., no `g' prefix). */
#include "fprintftime.h"
/* The official name of this program (e.g., no `g' prefix). */
@@
-493,10
+494,9
@@
main (int argc, char **argv)
/* (option_specified_date || set_date) */
if (reference != NULL)
{
/* (option_specified_date || set_date) */
if (reference != NULL)
{
- if (stat (reference, &refstats))
+ if (stat (reference, &refstats)
!= 0
)
error (EXIT_FAILURE, errno, "%s", reference);
error (EXIT_FAILURE, errno, "%s", reference);
- when.tv_sec = refstats.st_mtime;
- when.tv_nsec = TIMESPEC_NS (refstats.st_mtim);
+ when = get_stat_mtime (&refstats);
}
else
{
}
else
{