Change to support platforms that don't have fchmod().

This commit is contained in:
briano%netscape.com 1999-06-15 03:43:46 +00:00
Родитель 17c59c38df
Коммит 09eccdede6
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -390,7 +390,11 @@ main(int argc, char **argv)
if (utime(toname, &utb) < 0)
fail("cannot set times of %s", toname);
}
#ifdef HAVE_FCHMOD
if (fchmod(tofd, mode) < 0)
#else
if (chmod(toname, mode) < 0)
#endif
fail("cannot change mode of %s", toname);
#endif
if ((owner || group) && fchown(tofd, uid, gid) < 0)