diff --git a/src/main.cc b/src/main.cc index 6eafcdd..a942d00 100644 --- a/src/main.cc +++ b/src/main.cc @@ -29,6 +29,10 @@ #include "job.h" #include "debug.h" +#ifndef O_BINARY +#define O_BINARY 0 +#endif + namespace { @@ -146,7 +150,7 @@ int main(int argc, char *argv[]) { int fd = STDIN_FILENO; if (job_filename) { - fd = open(job_filename, O_RDONLY); + fd = open(job_filename, O_RDONLY | O_BINARY); if (fd < 0) { fprintf(stderr, "ERROR: " PACKAGE ": Unable to open raster file\n"); return 1;