summaryrefslogtreecommitdiff
path: root/io
diff options
context:
space:
mode:
Diffstat (limited to 'io')
-rw-r--r--io/test-utime.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/io/test-utime.c b/io/test-utime.c
index 8e44fa0865..24c287160b 100644
--- a/io/test-utime.c
+++ b/io/test-utime.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1996, 1997, 2000, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1994,1996,1997,2000,2002,2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -112,7 +112,12 @@ main (int argc, char *argv[])
return 1;
}
- if (stnow.st_mtime < now1 || stnow.st_mtime > now2)
+#ifdef _STATBUF_ST_NSEC
+# define CORR (stnow.st_mtim.tv_nsec == 0 ? 0 : 1)
+#else
+# define CORR 0
+#endif
+ if (stnow.st_mtime + CORR < now1 || stnow.st_mtime > now2)
{
printf ("modtime %ld <%ld >%ld\n", stnow.st_mtime, now1, now2);
return 1;