From ba79e984f96e1470e583cc1731b2f80da9de9afc Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Wed, 4 Nov 2009 06:19:23 -0700 Subject: [PATCH] utimens: fix use of futimens on older Linux Using UTIME_OMIT with non-zero seconds was already worked around for utimensat, but I missed the futimens case. * lib/utimens.c (fdutimens): Use updated, rather than original, timespec to avoid bug in older Linux kernel. Reported by Simon Josefsson. Signed-off-by: Eric Blake --- ChangeLog | 7 +++++++ lib/utimens.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 58635bdaa..57a7fdb32 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-11-04 Eric Blake + + utimens: fix use of futimens on older Linux + * lib/utimens.c (fdutimens): Use updated, rather than original, + timespec to avoid bug in older Linux kernel. + Reported by Simon Josefsson. + 2009-11-04 Bruno Haible Make num_processors more flexible and consistent. diff --git a/lib/utimens.c b/lib/utimens.c index ffc60b699..ce759a1d0 100644 --- a/lib/utimens.c +++ b/lib/utimens.c @@ -227,7 +227,7 @@ fdutimens (char const *file, int fd, struct timespec const timespec[2]) # endif /* HAVE_UTIMENSAT */ # if HAVE_FUTIMENS { - int result = futimens (fd, timespec); + int result = futimens (fd, ts); # ifdef __linux__ /* Work around the same bug as above. */ if (0 < result) -- 2.11.0