From f2da16f451812f40bed51fd60a304df3d7dfc1bd Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sun, 6 Jun 2010 17:53:48 +0200 Subject: [PATCH] date: make FEATURE_NANO compile on glibc systems Signed-off-by: Denys Vlasenko --- coreutils/date.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/coreutils/date.c b/coreutils/date.c index c599df735..3d78a5336 100644 --- a/coreutils/date.c +++ b/coreutils/date.c @@ -204,7 +204,11 @@ int date_main(int argc UNUSED_PARAM, char **argv) xstat(filename, &statbuf); ts.tv_sec = statbuf.st_mtime; #if ENABLE_FEATURE_DATE_NANO - ts.tv_nsec = statbuf.st_mtimensec; //or st_atim.tv_nsec? +# if defined __GLIBC__ && !defined __UCLIBC__ + ts.tv_nsec = statbuf.st_mtim.tv_nsec; +# else + ts.tv_nsec = statbuf.st_mtimensec; +# endif #endif } else { #if ENABLE_FEATURE_DATE_NANO