diff options
Diffstat (limited to 'src/serdi.c')
-rw-r--r-- | src/serdi.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/serdi.c b/src/serdi.c index 527ada50..03de46fd 100644 --- a/src/serdi.c +++ b/src/serdi.c @@ -16,6 +16,11 @@ #include "serd_internal.h" +#ifdef _WIN32 +#include <fcntl.h> +#include <io.h> +#endif + #include <assert.h> #include <errno.h> #include <stdlib.h> @@ -201,6 +206,11 @@ main(int argc, char** argv) return 1; } +#ifdef _WIN32 + _setmode(fileno(stdin), _O_BINARY); + _setmode(fileno(stdout), _O_BINARY); +#endif + const uint8_t* input = (const uint8_t*)argv[a++]; if (from_file) { in_name = in_name ? in_name : input; |