# HG changeset patch # User Eric Blake # Date 1257340763 25200 # Node ID 993b8355a1cf3ac01b661ac876f0d3e8f46c5232 # Parent 03fb041aaee15551798b2c4621b07ce6484baf9f 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 diff --git a/ChangeLog b/ChangeLog --- 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 --- a/lib/utimens.c +++ b/lib/utimens.c @@ -227,7 +227,7 @@ # 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)