aboutsummaryrefslogtreecommitdiff
path: root/src/lzmainfo
diff options
context:
space:
mode:
Diffstat (limited to 'src/lzmainfo')
-rw-r--r--src/lzmainfo/lzmainfo.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lzmainfo/lzmainfo.c b/src/lzmainfo/lzmainfo.c
index b5f36320..8bd43af6 100644
--- a/src/lzmainfo/lzmainfo.c
+++ b/src/lzmainfo/lzmainfo.c
@@ -20,6 +20,11 @@
#include "tuklib_progname.h"
#include "tuklib_exit.h"
+#ifdef TUKLIB_DOSLIKE
+# include <fcntl.h>
+# include <io.h>
+#endif
+
static void lzma_attribute((noreturn))
help(void)
@@ -171,6 +176,10 @@ main(int argc, char **argv)
parse_args(argc, argv);
+#ifdef TUKLIB_DOSLIKE
+ setmode(STDIN_FILENO, O_BINARY);
+#endif
+
int ret = EXIT_SUCCESS;
// We print empty lines around the output only when reading from