On 09/24/2014 06:17 AM, Colin Watson wrote: > On Wed, Sep 24, 2014 at 12:37:58PM +0100, Pádraig Brady wrote: >> > Sounds like it would come under the few line change "trivial" criteria, >> > so please send the path on. > OK, thanks. Attached here. > > -- Colin Watson [[email protected]] > > > 0001-utimens-handle-lack-of-UTIME_-on-GNU-Hurd.patch > > >>From 5141074863eee7a8dbb76921aa1f406cb7168dee Mon Sep 17 00:00:00 2001 > From: Colin Watson <[email protected]> > Date: Wed, 24 Sep 2014 13:09:50 +0100 > Subject: [PATCH] utimens: handle lack of UTIME_* on GNU/Hurd > > The Hurd has futimens, but does not currently support > UTIME_NOW/UTIME_OMIT (https://bugs.debian.org/762677). Resolve these to > real timestamps if necessary. >
> } > # endif > +# ifdef __GNU__ I'd rather we make this conditional on a feature probe (such as #ifdef UTIME_NOW_WORKS, suitably defined via a configure-time test) than a platform probe, so that when the platform is eventually fixed, we quit using the fallback. > + /* Work around lack of UTIME_NOW/UTIME_OMIT support: > + <https://bugs.debian.org/762677>. */ > + if (adjustment_needed > 0) > + { > + if (fd < 0 ? stat (file, &st) : fstat (fd, &st)) > + return -1; > + update_timespec (&st, &ts); > + /* Note that st is good, in case futimens gives ENOSYS. */ > + adjustment_needed = 3; > + } but this part seems reasonable. > +# endif > # if HAVE_UTIMENSAT > if (fd < 0) > { > -- 2.1.0 > -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
