From 66c056930e7e094e50e6ba45428f4701afc2a0fa Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sun, 2 Aug 2020 21:57:31 +0000 Subject: [PATCH] zip-test: Open files in binary mode. Fixes a test failure on mingw. --- tests/libpspp/zip-test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/libpspp/zip-test.c b/tests/libpspp/zip-test.c index 9b44c1e7c2..777b37a795 100644 --- a/tests/libpspp/zip-test.c +++ b/tests/libpspp/zip-test.c @@ -54,7 +54,7 @@ main (int argc, char **argv) struct zip_writer *zw = zip_writer_create (argv[2]); for (i = 3; i < argc; ++i) { - FILE *fp = fopen (argv[i], "r"); + FILE *fp = fopen (argv[i], "rb"); if (!fp) check_die (); zip_writer_add (zw, fp, argv[i]); } @@ -76,7 +76,7 @@ main (int argc, char **argv) { int x = 0; struct zip_member *zm ; - FILE *fp = fopen (argv[i], "w"); + FILE *fp = fopen (argv[i], "wb"); if (NULL == fp) { int e = errno; -- 2.30.2