utimens: fix regression on Solaris
authorEric Blake <ebb9@byu.net>
Wed, 18 Nov 2009 13:59:44 +0000 (06:59 -0700)
committerEric Blake <ebb9@byu.net>
Wed, 18 Nov 2009 13:59:44 +0000 (06:59 -0700)
commit0883405cc751858a633bebc56acb75381a6e50c8
tree69103ad2238a720bc15605d834aadd55d349503b
parent6038ee4b827caaf05fa37dbb2304fedb9d0cd6c7
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