/* Set file access and modification times.
- Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software
+ Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
#include <errno.h>
#include <fcntl.h>
+#include <sys/time.h>
#include <unistd.h>
#if HAVE_UTIME_H
problem affects many applications. */
#if HAVE_BUGGY_NFS_TIME_STAMPS
- if (0 <= fd)
- fsync (fd);
- else
+ if (fd < 0)
sync ();
+ else
+ fsync (fd);
#endif
/* There's currently no interface to set file timestamps with