Merge branches 'fix-obinary', 'net-client-eof-handling' and 'report-bind-errors'

This commit is contained in:
Oliver Jowett 2014-10-01 12:41:28 +01:00
commit 622b158367
2 changed files with 10 additions and 3 deletions

View file

@ -838,7 +838,13 @@ int main(int argc, char **argv) {
} else {
if (Modes.filename[0] == '-' && Modes.filename[1] == '\0') {
Modes.fd = STDIN_FILENO;
} else if ((Modes.fd = open(Modes.filename, (O_RDONLY | O_BINARY))) == -1) {
} else if ((Modes.fd = open(Modes.filename,
#ifdef _WIN32
(O_RDONLY | O_BINARY)
#else
(O_RDONLY)
#endif
)) == -1) {
perror("Opening data file");
exit(1);
}