#include <errno.h>
#include <string.h>
#include <getopt.h>
-#include <utime.h>
#include <fcntl.h>
/* We don't use our include/crc32.h, but crc32 from zlib!
*/
#include <zlib.h>
+#include <sys/time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
static void change_file_status(char *path, struct cramfs_inode *i)
{
- struct utimbuf epoch = { 0, 0 };
+ const struct timeval epoch = { 0, 0 };
if (euid == 0) {
if (lchown(path, i->uid, i->gid) < 0)
}
if (S_ISLNK(i->mode))
return;
- if (utime(path, &epoch) < 0)
- err(FSCK_EX_ERROR, _("utime failed: %s"), path);
+ if (utimes(path, &epoch) < 0)
+ err(FSCK_EX_ERROR, _("utimes failed: %s"), path);
}
static void do_directory(char *path, struct cramfs_inode *i)