diff --git a/ncat/ncat_core.c b/ncat/ncat_core.c index 51af9a813..8332c5b7c 100644 --- a/ncat/ncat_core.c +++ b/ncat/ncat_core.c @@ -459,9 +459,9 @@ int ncat_delay_timer(int delayval) int ncat_openlog(const char *logfile, int append) { if (append) - return Open(logfile, O_WRONLY | O_CREAT | O_APPEND, 0664); + return Open(logfile, O_BINARY | O_WRONLY | O_CREAT | O_APPEND, 0664); else - return Open(logfile, O_WRONLY | O_CREAT | O_TRUNC, 0664); + return Open(logfile, O_BINARY | O_WRONLY | O_CREAT | O_TRUNC, 0664); } static int ncat_hexdump(int logfd, const char *data, int len);