From: Sami Kerola Date: Mon, 7 Jan 2019 22:23:04 +0000 (+0000) Subject: fsck.cramfs: use utimes() instead of utime() that is obsolete X-Git-Tag: v2.34-rc1~159^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ad7ac3d598e2d541d9eba70975e68dff7e52c7d9;p=thirdparty%2Futil-linux.git fsck.cramfs: use utimes() instead of utime() that is obsolete Reference: http://man7.org/linux/man-pages/man3/utime.3p.html#APPLICATION_USAGE Signed-off-by: Sami Kerola --- diff --git a/disk-utils/fsck.cramfs.c b/disk-utils/fsck.cramfs.c index 0d9bdadf77..76ed303b0e 100644 --- a/disk-utils/fsck.cramfs.c +++ b/disk-utils/fsck.cramfs.c @@ -42,7 +42,6 @@ #include #include #include -#include #include /* We don't use our include/crc32.h, but crc32 from zlib! @@ -52,6 +51,7 @@ */ #include +#include #include #include #include @@ -419,7 +419,7 @@ static void do_uncompress(char *path, int outfd, unsigned long offset, 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) @@ -431,8 +431,8 @@ static void change_file_status(char *path, struct cramfs_inode *i) } 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)