X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fmake-file.c;h=2162741a78e416324d07578f49e5d75f5da4a95e;hb=719074919206c376cf4b0971213caa173af22c89;hp=f8719dc67223d6cd1f44be998f49632ac5bdf0ce;hpb=707848060e414fe93458834446dd7cdbf800667f;p=pspp diff --git a/src/data/make-file.c b/src/data/make-file.c index f8719dc672..2162741a78 100644 --- a/src/data/make-file.c +++ b/src/data/make-file.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -184,7 +185,7 @@ replace_file_start (const char *file_name, const char *mode, } /* Create file by that name. */ - fd = open (rf->tmp_name, O_WRONLY | O_CREAT | O_EXCL, permissions); + fd = open (rf->tmp_name, O_WRONLY | O_CREAT | O_EXCL | O_BINARY, permissions); if (fd >= 0) break; if (errno != EEXIST)