diff options
-rw-r--r-- | scripts/basic/fixdep.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c index f012551af..7bb808b9e 100644 --- a/scripts/basic/fixdep.c +++ b/scripts/basic/fixdep.c | |||
@@ -126,6 +126,10 @@ | |||
126 | #define INT_FIG_ ntohl(0x4649475f) | 126 | #define INT_FIG_ ntohl(0x4649475f) |
127 | */ | 127 | */ |
128 | 128 | ||
129 | #ifndef O_BINARY | ||
130 | #define O_BINARY 0 | ||
131 | #endif | ||
132 | |||
129 | #ifdef __MINGW32__ | 133 | #ifdef __MINGW32__ |
130 | #define UNUSED __attribute__ ((__unused__)) | 134 | #define UNUSED __attribute__ ((__unused__)) |
131 | 135 | ||
@@ -337,7 +341,7 @@ void do_config_file(char *filename) | |||
337 | int fd; | 341 | int fd; |
338 | void *map; | 342 | void *map; |
339 | 343 | ||
340 | fd = open(filename, O_RDONLY); | 344 | fd = open(filename, O_RDONLY | O_BINARY); |
341 | if (fd < 0) { | 345 | if (fd < 0) { |
342 | fprintf(stderr, "fixdep: "); | 346 | fprintf(stderr, "fixdep: "); |
343 | perror(filename); | 347 | perror(filename); |
@@ -408,7 +412,7 @@ void print_deps(void) | |||
408 | int fd; | 412 | int fd; |
409 | void *map; | 413 | void *map; |
410 | 414 | ||
411 | fd = open(depfile, O_RDONLY); | 415 | fd = open(depfile, O_RDONLY | O_BINARY); |
412 | if (fd < 0) { | 416 | if (fd < 0) { |
413 | fprintf(stderr, "fixdep: "); | 417 | fprintf(stderr, "fixdep: "); |
414 | perror(depfile); | 418 | perror(depfile); |