utimens: fix regression on Solaris
authorEric Blake <ebb9@byu.net>
Wed, 18 Nov 2009 13:59:44 +0000 (06:59 -0700)
committerIan Beckwith <ianb@erislabs.net>
Fri, 20 Nov 2009 00:37:34 +0000 (00:37 +0000)
commit72abcbb073b9ea67920501360a3935c95cc2cdad
tree75f80ca84d8bd168ad9fb35f5ae75fd2094a0129
parent5f5b05c7db0fcb98115a9bbd49e99e6f45b9b65d
utimens: fix regression on Solaris

Revert commit 26c5fd742f.  Solaris lacks futimens and futimes, so
futimesat is the only way to change fd timestamps.  But since
FreeBSD futimesat can't change fd timestamps, we need a configure
check to avoid the crash there.

* m4/utimens.m4 (gl_UTIMENS): Check for BSD bug.
* lib/utimens.c (fdutimens): Revert 2009-11-08 change; Solaris 10
can only change fd timestamps via futimesat.  Instead, use an
additional witness macro to avoid BSD bug.
Reported by Jim Meyering.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
lib/utimens.c
m4/utimens.m4