summaryrefslogtreecommitdiffstats
path: root/lib/libarchive
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2009-12-28 02:14:09 +0000
committerkientzle <kientzle@FreeBSD.org>2009-12-28 02:14:09 +0000
commit55a923f0e84ac5bf3d84e8f13ca4bfa0aa856c09 (patch)
treee276beaba2cfa77c44533243c497e8eaeb9eb4ba /lib/libarchive
parentc947d50aa19dec1377e00394b3a88e96957bcb1c (diff)
downloadFreeBSD-src-55a923f0e84ac5bf3d84e8f13ca4bfa0aa856c09.zip
FreeBSD-src-55a923f0e84ac5bf3d84e8f13ca4bfa0aa856c09.tar.gz
Sync with googlecode some changes that have no impact on FreeBSD.
Diffstat (limited to 'lib/libarchive')
-rw-r--r--lib/libarchive/archive_read_disk_entry_from_file.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/libarchive/archive_read_disk_entry_from_file.c b/lib/libarchive/archive_read_disk_entry_from_file.c
index 8f90191..a833765 100644
--- a/lib/libarchive/archive_read_disk_entry_from_file.c
+++ b/lib/libarchive/archive_read_disk_entry_from_file.c
@@ -103,7 +103,7 @@ archive_read_disk_entry_from_file(struct archive *_a,
* open file descriptor which we can use in the subsequent lookups. */
if ((S_ISREG(st->st_mode) || S_ISDIR(st->st_mode))) {
if (fd < 0)
- fd = open(pathname, O_RDONLY | O_NONBLOCK);
+ fd = open(pathname, O_RDONLY | O_NONBLOCK | O_BINARY);
if (fd >= 0) {
unsigned long stflags;
int r = ioctl(fd, EXT2_IOC_GETFLAGS, &stflags);
@@ -114,6 +114,11 @@ archive_read_disk_entry_from_file(struct archive *_a,
#endif
if (st == NULL) {
+ /* TODO: On Windows, use GetFileInfoByHandle() here.
+ * Using Windows stat() call is badly broken, but
+ * even the stat() wrapper has problems because
+ * 'struct stat' is broken on Windows.
+ */
#if HAVE_FSTAT
if (fd >= 0) {
if (fstat(fd, &s) != 0)
OpenPOWER on IntegriCloud