1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Fabian Groffen <grobian@gentoo.org>
3 Date: Sat, 16 Jul 2022 21:34:13 +0200
4 Subject: [PATCH 07/19] replace initialized constant with #define statement
8 filetree.c:744:9: error: variable-sized object may not be initialized
10 Since there's nothing changing at runtime at all, just make the compiler
11 see it's always going to be 1.
13 Patch-Source: https://github.com/gentoo/gentoo/blob/dce914f2bbf52360f45c90d877857df3c4c2a353/app-arch/xar/files/xar-1.8.0.0.487-variable-sized-object.patch
15 xar/lib/filetree.c | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
18 diff --git a/xar/lib/filetree.c b/xar/lib/filetree.c
19 index f31682a..9c30c03 100644
20 --- a/xar/lib/filetree.c
21 +++ b/xar/lib/filetree.c
22 @@ -752,7 +752,7 @@ int xar_file_equals_file(xar_file_t f1, xar_file_t f2)
23 size_t fspath1_size = 0, fspath2_size = 0;
24 size_t ns1_size = 0, ns2_size = 0;
25 const struct __xar_file_t * child1 = NULL, * child2 = NULL;
26 - const uint keys_to_ignore_count = 1;
27 +#define keys_to_ignore_count 1
28 char * keys_to_ignore[keys_to_ignore_count] = { "id" }; // ID is allowed ot mismatch
30 // If the two pointers match, call it the same.