summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-arch/xar/files')
-rw-r--r--app-arch/xar/files/xar-1.8.0.0.487-non-darwin.patch12
-rw-r--r--app-arch/xar/files/xar-1.8.0.0.487-variable-sized-object.patch18
-rw-r--r--app-arch/xar/files/xar-1.8.0.0.498-impl-decls.patch24
3 files changed, 54 insertions, 0 deletions
diff --git a/app-arch/xar/files/xar-1.8.0.0.487-non-darwin.patch b/app-arch/xar/files/xar-1.8.0.0.487-non-darwin.patch
new file mode 100644
index 000000000000..c350f69f4ca0
--- /dev/null
+++ b/app-arch/xar/files/xar-1.8.0.0.487-non-darwin.patch
@@ -0,0 +1,12 @@
+don't do availability stuff on non-Darwin
+
+--- a/include/xar.h.in
++++ b/include/xar.h.in
+@@ -52,6 +52,7 @@
+ #import <os/availability.h>
+ #else
+ #define API_DEPRECATED(...)
++#define API_AVAILABLE(...)
+ #endif
+
+ #pragma pack(4)
diff --git a/app-arch/xar/files/xar-1.8.0.0.487-variable-sized-object.patch b/app-arch/xar/files/xar-1.8.0.0.487-variable-sized-object.patch
new file mode 100644
index 000000000000..8779c1129cd7
--- /dev/null
+++ b/app-arch/xar/files/xar-1.8.0.0.487-variable-sized-object.patch
@@ -0,0 +1,18 @@
+GCC doesn't like this:
+
+filetree.c:744:9: error: variable-sized object may not be initialized
+
+Since there's nothing changing at runtime at all, just make the compiler
+see it's always going to be 1.
+
+--- a/lib/filetree.c
++++ b/lib/filetree.c
+@@ -740,7 +740,7 @@
+ size_t fspath1_size = 0, fspath2_size = 0;
+ size_t ns1_size = 0, ns2_size = 0;
+ const struct __xar_file_t * child1 = NULL, * child2 = NULL;
+- const uint keys_to_ignore_count = 1;
++#define keys_to_ignore_count 1
+ char * keys_to_ignore[keys_to_ignore_count] = { "id" }; // ID is allowed ot mismatch
+
+ // If the two pointers match, call it the same.
diff --git a/app-arch/xar/files/xar-1.8.0.0.498-impl-decls.patch b/app-arch/xar/files/xar-1.8.0.0.498-impl-decls.patch
new file mode 100644
index 000000000000..8c37a6c9cfbc
--- /dev/null
+++ b/app-arch/xar/files/xar-1.8.0.0.498-impl-decls.patch
@@ -0,0 +1,24 @@
+include stdlib.h for free and strtol
+silence format warning
+
+--- a/lib/ext2.c
++++ b/lib/ext2.c
+@@ -41,6 +41,7 @@
+ #include "asprintf.h"
+ #endif
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <unistd.h>
+ #include "xar.h"
+ #include "arcmod.h"
+--- a/lib/ea.c
++++ a/lib/ea.c
+@@ -67,7 +67,7 @@
+ xar_prop_setvalue(XAR_EA(ret)->prop, NULL);
+ XAR_PROP(XAR_EA(ret)->prop)->attrs = xar_attr_new();
+ XAR_ATTR(XAR_PROP(XAR_EA(ret)->prop)->attrs)->key = strdup("id");
+- asprintf((char **)&XAR_ATTR(XAR_PROP(XAR_EA(ret)->prop)->attrs)->value, "%lld", XAR_FILE(f)->nexteaid++);
++ asprintf((char **)&XAR_ATTR(XAR_PROP(XAR_EA(ret)->prop)->attrs)->value, PRId64, XAR_FILE(f)->nexteaid++);
+
+ xar_prop_pset(f, XAR_EA(ret)->prop, "name", name);
+