瀏覽代碼

COMP: Fix windows

Andy Cedilnik 20 年之前
父節點
當前提交
3d7939b1c3
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      Utilities/cmtar/append.c
  2. 1 1
      Utilities/cmtar/libtar.c

+ 1 - 1
Utilities/cmtar/append.c

@@ -231,7 +231,7 @@ tar_append_regfile(TAR *t, char *realname)
   int i, j;
   size_t size;
 
-  filefd = open(realname, O_RDONLY);
+  filefd = open(realname, O_RDONLY | O_BINARY);
   if (filefd == -1)
   {
 #ifdef DEBUG

+ 1 - 1
Utilities/cmtar/libtar.c

@@ -15,7 +15,7 @@
 #include <stdio.h>
 #include <fcntl.h>
 #include <errno.h>
-#if !defined(_WIN32) || defined(__CYGWIN__)
+#if defined(_WIN32) && !defined(__CYGWIN__)
 #include <libtar/compat.h>
 #include <io.h>
 #else