Files
MSYS2-packages/libarchive/libarchive-3.2.2-path_fix.patch
J. Peter Mugaas 8c9e0003f3 libarchive - 3.2.2 Update to latest version
Latest version
Add patch for a compiler error.  I have taken the liberty of making a
merge request to the libarchive developers.
https://github.com/libarchive/libarchive/pull/818 .  I deally, I would
like to remove all patches from this.
2016-11-01 08:24:51 -04:00

39 lines
1.0 KiB
Diff

--- libarchive-3.2.2/libarchive/archive_write_disk_posix.c.orig 2016-11-01 00:12:25.688260500 -0400
+++ libarchive-3.2.2/libarchive/archive_write_disk_posix.c 2016-11-01 00:17:05.439478200 -0400
@@ -2625,7 +2625,7 @@
* See also : http://msdn.microsoft.com/en-us/library/aa365247.aspx
*/
static void
-cleanup_pathname_win(struct archive_write_disk *a)
+cleanup_pathname_win(char *path)
{
wchar_t wc;
char *p;
@@ -2636,7 +2636,7 @@
mb = 0;
complete = 1;
utf8 = (strcmp(nl_langinfo(CODESET), "UTF-8") == 0)? 1: 0;
- for (p = a->name; *p != '\0'; p++) {
+ for (p = path; *p != '\0'; p++) {
++alen;
if (*p == '\\') {
/* If previous byte is smaller than 128,
@@ -2661,7 +2661,7 @@
/*
* Convert path separator in wide-character.
*/
- p = a->name;
+ p = path;
while (*p != '\0' && alen) {
l = mbtowc(&wc, p, alen);
if (l == (size_t)-1) {
@@ -2703,7 +2703,7 @@
}
#if defined(__CYGWIN__)
- cleanup_pathname_win(a);
+ cleanup_pathname_win(path);
#endif
/* Skip leading '/'. */
if (*src == '/') {