MSYS2-packages/apr/binary-copy.patch
2018-10-09 07:44:42 +03:00

32 lines
1.0 KiB
Diff

From: David Rothenberger <d.rothenberger@entomo.com>
---
file_io/unix/copy.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/file_io/unix/copy.c b/file_io/unix/copy.c
index df3a49c..aa2836f 100644
--- a/file_io/unix/copy.c
+++ b/file_io/unix/copy.c
@@ -29,7 +29,7 @@ static apr_status_t apr_file_transfer_contents(const char *from_path,
apr_fileperms_t perms;
/* Open source file. */
- status = apr_file_open(&s, from_path, APR_FOPEN_READ, APR_OS_DEFAULT, pool);
+ status = apr_file_open(&s, from_path, APR_FOPEN_READ | APR_FOPEN_BINARY, APR_OS_DEFAULT, pool);
if (status)
return status;
@@ -47,7 +47,7 @@ static apr_status_t apr_file_transfer_contents(const char *from_path,
perms = to_perms;
/* Open dest file. */
- status = apr_file_open(&d, to_path, flags, perms, pool);
+ status = apr_file_open(&d, to_path, flags | APR_FOPEN_BINARY, perms, pool);
if (status) {
apr_file_close(s); /* toss any error */
return status;