forked from devkitPro/3ds_portlibs
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathlibarchive.patch
86 lines (79 loc) · 3.15 KB
/
libarchive.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
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 2013-01-13 20:43:45.000000000 -0500
+++ libarchive-3.1.2/libarchive/archive_ppmd7.c 2016-05-28 09:20:30.508455170 -0400
@@ -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 2013-01-13 20:43:45.000000000 -0500
+++ libarchive-3.1.2/libarchive/archive_read_disk_posix.c 2016-05-28 09:21:50.131786140 -0400
@@ -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
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 2013-02-07 19:52:07.000000000 -0500
+++ libarchive-3.1.2/libarchive/archive_write_disk_posix.c 2016-05-28 09:35:03.598429241 -0400
@@ -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 2013-02-07 19:52:07.000000000 -0500
+++ libarchive-3.1.2/libarchive/archive_write_set_format_iso9660.c 2016-05-28 09:22:47.435117771 -0400
@@ -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)