Imported Upstream version 1.47.0
[platform/upstream/e2fsprogs.git] / util / subst.c
index 66d7d9a..be2a0dd 100644 (file)
@@ -434,16 +434,20 @@ int main(int argc, char **argv)
                                        printf("Using original atime\n");
                                set_utimes(outfn, fileno(old), tv);
                        }
+#ifndef _WIN32
                        if (ofd >= 0)
                                (void) fchmod(ofd, 0444);
+#endif
                        fclose(out);
                        if (unlink(newfn) < 0)
                                perror("unlink");
                } else {
                        if (verbose)
                                printf("Creating or replacing %s.\n", outfn);
+#ifndef _WIN32
                        if (ofd >= 0)
                                (void) fchmod(ofd, 0444);
+#endif
                        fclose(out);
                        if (old)
                                fclose(old);