summaryrefslogtreecommitdiff
path: root/lib/libarchive
diff options
context:
space:
mode:
authorTim Kientzle <kientzle@FreeBSD.org>2008-02-19 05:46:58 +0000
committerTim Kientzle <kientzle@FreeBSD.org>2008-02-19 05:46:58 +0000
commit98ef1f2ddbff6c4f7904d2ba2990e5bcf8647f9d (patch)
tree133dcdbcc9cafe11daa613099cfab966a31b95ff /lib/libarchive
parentf167d4f9c38fe2f9056975b426b62658feaaf9e2 (diff)
Notes
Diffstat (limited to 'lib/libarchive')
-rw-r--r--lib/libarchive/archive_write_open_filename.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libarchive/archive_write_open_filename.c b/lib/libarchive/archive_write_open_filename.c
index e6c92bc929fa..f0613ef4c118 100644
--- a/lib/libarchive/archive_write_open_filename.c
+++ b/lib/libarchive/archive_write_open_filename.c
@@ -47,6 +47,10 @@ __FBSDID("$FreeBSD$");
#include "archive.h"
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
+
struct write_file_data {
int fd;
char filename[1];
@@ -95,7 +99,7 @@ file_open(struct archive *a, void *client_data)
struct stat st;
mine = (struct write_file_data *)client_data;
- flags = O_WRONLY | O_CREAT | O_TRUNC;
+ flags = O_WRONLY | O_CREAT | O_TRUNC | O_BINARY;
/*
* Open the file.