This repository has been archived by the owner on Mar 23, 2018. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 27
/
libarchive-3.1.2.patch
109 lines (101 loc) · 3.56 KB
/
libarchive-3.1.2.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
diff -Naur libarchive-3.1.2.orig/libarchive/archive_ppmd7.c libarchive-3.1.2/libarchive/archive_ppmd7.c
--- libarchive-3.1.2.orig/libarchive/archive_ppmd7.c
+++ libarchive-3.1.2/libarchive/archive_ppmd7.c
@@ -4,7 +4,7 @@
#include "archive_platform.h"
-#include <memory.h>
+// #include <memory.h>
#include "archive_ppmd7_private.h"
diff -Naur libarchive-3.1.2.orig/libarchive/archive_read_disk_posix.c libarchive-3.1.2/libarchive/archive_read_disk_posix.c
--- libarchive-3.1.2.orig/libarchive/archive_read_disk_posix.c
+++ libarchive-3.1.2/libarchive/archive_read_disk_posix.c
@@ -100,7 +100,7 @@
#include "archive_read_disk_private.h"
#ifndef HAVE_FCHDIR
-#error fchdir function required.
+// #error fchdir function required.
#endif
#ifndef O_BINARY
#define O_BINARY 0
@@ -2417,7 +2417,7 @@
#else
if (tree_enter_working_dir(t) != 0)
return NULL;
- if (lstat(tree_current_access_path(t), &t->lst) != 0)
+ if (stat(tree_current_access_path(t), &t->lst) != 0)
#endif
return NULL;
t->flags |= hasLstat;
diff -Naur libarchive-3.1.2.orig/libarchive/archive_read_support_format_mtree.c libarchive-3.1.2/libarchive/archive_read_support_format_mtree.c
--- libarchive-3.1.2.orig/libarchive/archive_read_support_format_mtree.c
+++ libarchive-3.1.2/libarchive/archive_read_support_format_mtree.c
@@ -1144,7 +1144,7 @@
mtree->fd = -1;
st = NULL;
}
- } else if (lstat(path, st) == -1) {
+ } else if (stat(path, st) == -1) {
st = NULL;
}
diff -Naur libarchive-3.1.2.orig/libarchive/archive_write_disk_posix.c libarchive-3.1.2/libarchive/archive_write_disk_posix.c
--- libarchive-3.1.2.orig/libarchive/archive_write_disk_posix.c
+++ libarchive-3.1.2/libarchive/archive_write_disk_posix.c
@@ -384,7 +384,7 @@
* XXX At this point, symlinks should not be hit, otherwise
* XXX a race occurred. Do we want to check explicitly for that?
*/
- if (lstat(a->name, &a->st) == 0) {
+ if (stat(a->name, &a->st) == 0) {
a->pst = &a->st;
return (ARCHIVE_OK);
}
@@ -499,7 +499,7 @@
* user edits their umask during the extraction for some
* reason.
*/
- umask(a->user_umask = umask(0));
+// umask(a->user_umask = umask(0));
/* Figure out what we need to do for this entry. */
a->todo = TODO_MODE_BASE;
@@ -1760,7 +1760,7 @@
a->archive.vtable = archive_write_disk_vtable();
a->start_time = time(NULL);
/* Query and restore the umask. */
- umask(a->user_umask = umask(0));
+// umask(a->user_umask = umask(0));
#ifdef HAVE_GETEUID
a->user_uid = geteuid();
#endif /* HAVE_GETEUID */
@@ -1910,8 +1910,8 @@
* If it's not a dir (or it's a broken symlink),
* then don't follow it.
*/
- if (r != 0 || !S_ISDIR(a->mode))
- r = lstat(a->name, &a->st);
+// if (r != 0 || !S_ISDIR(a->mode))
+// r = lstat(a->name, &a->st);
if (r != 0) {
archive_set_error(&a->archive, errno,
"Can't stat existing object");
diff -Naur libarchive-3.1.2.orig/libarchive/archive_write_set_format_iso9660.c libarchive-3.1.2/libarchive/archive_write_set_format_iso9660.c
--- libarchive-3.1.2.orig/libarchive/archive_write_set_format_iso9660.c
+++ libarchive-3.1.2/libarchive/archive_write_set_format_iso9660.c
@@ -2178,7 +2178,7 @@
strncpy(system_id, "Windows", size-1);
system_id[size-1] = '\0';
#else
-#error no way to get the system identifier on your platform.
+// #error no way to get the system identifier on your platform.
#endif
}
@@ -2508,7 +2508,7 @@
#elif defined(__CYGWIN__) || defined(__MINGW32__) || defined(__BORLANDC__)
offset = _timezone;
#else
- offset = timezone;
+ offset = _timezone;
#endif
offset *= -1;
if (tm->tm_isdst)
--
2.7.2.windows.1