diff options
Diffstat (limited to 'meta')
3 files changed, 109 insertions, 0 deletions
diff --git a/meta/recipes-devtools/git/git/0001-index-pack-rename-struct-thread_local.patch b/meta/recipes-devtools/git/git/0001-index-pack-rename-struct-thread_local.patch new file mode 100644 index 0000000000..b3b490064f --- /dev/null +++ b/meta/recipes-devtools/git/git/0001-index-pack-rename-struct-thread_local.patch | |||
@@ -0,0 +1,67 @@ | |||
1 | From e8b3bcf49120309b207b7afc25c4aa81b866ac45 Mon Sep 17 00:00:00 2001 | ||
2 | From: "brian m. carlson" <sandals@crustytoothpaste.net> | ||
3 | Date: Sun, 17 Nov 2024 01:31:48 +0000 | ||
4 | Subject: [PATCH] index-pack: rename struct thread_local | ||
5 | |||
6 | "thread_local" is a keyword in C23. To make sure that our code compiles | ||
7 | on a wide variety of C versions, rename struct thread_local to "struct | ||
8 | thread_local_data" to avoid a conflict. | ||
9 | |||
10 | Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> | ||
11 | Signed-off-by: Junio C Hamano <gitster@pobox.com> | ||
12 | |||
13 | Upstream-Status: Backport [v2.48.0 e8b3bcf49120309b207b7afc25c4aa81b866ac45] | ||
14 | Signed-off-by: Martin Jansa <martin.jansa@gmail.com> | ||
15 | --- | ||
16 | builtin/index-pack.c | 10 +++++----- | ||
17 | 1 file changed, 5 insertions(+), 5 deletions(-) | ||
18 | |||
19 | diff --git a/builtin/index-pack.c b/builtin/index-pack.c | ||
20 | index e228c56ff2..74675dbd6c 100644 | ||
21 | --- a/builtin/index-pack.c | ||
22 | +++ b/builtin/index-pack.c | ||
23 | @@ -94,7 +94,7 @@ static LIST_HEAD(done_head); | ||
24 | static size_t base_cache_used; | ||
25 | static size_t base_cache_limit; | ||
26 | |||
27 | -struct thread_local { | ||
28 | +struct thread_local_data { | ||
29 | pthread_t thread; | ||
30 | int pack_fd; | ||
31 | }; | ||
32 | @@ -117,7 +117,7 @@ static struct object_entry *objects; | ||
33 | static struct object_stat *obj_stat; | ||
34 | static struct ofs_delta_entry *ofs_deltas; | ||
35 | static struct ref_delta_entry *ref_deltas; | ||
36 | -static struct thread_local nothread_data; | ||
37 | +static struct thread_local_data nothread_data; | ||
38 | static int nr_objects; | ||
39 | static int nr_ofs_deltas; | ||
40 | static int nr_ref_deltas; | ||
41 | @@ -148,7 +148,7 @@ static uint32_t input_crc32; | ||
42 | static int input_fd, output_fd; | ||
43 | static const char *curr_pack; | ||
44 | |||
45 | -static struct thread_local *thread_data; | ||
46 | +static struct thread_local_data *thread_data; | ||
47 | static int nr_dispatched; | ||
48 | static int threads_active; | ||
49 | |||
50 | @@ -390,7 +390,7 @@ static NORETURN void bad_object(off_t offset, const char *format, ...) | ||
51 | (uintmax_t)offset, buf); | ||
52 | } | ||
53 | |||
54 | -static inline struct thread_local *get_thread_data(void) | ||
55 | +static inline struct thread_local_data *get_thread_data(void) | ||
56 | { | ||
57 | if (HAVE_THREADS) { | ||
58 | if (threads_active) | ||
59 | @@ -401,7 +401,7 @@ static inline struct thread_local *get_thread_data(void) | ||
60 | return ¬hread_data; | ||
61 | } | ||
62 | |||
63 | -static void set_thread_data(struct thread_local *data) | ||
64 | +static void set_thread_data(struct thread_local_data *data) | ||
65 | { | ||
66 | if (threads_active) | ||
67 | pthread_setspecific(key, data); | ||
diff --git a/meta/recipes-devtools/git/git/0001-reflog-rename-unreachable.patch b/meta/recipes-devtools/git/git/0001-reflog-rename-unreachable.patch new file mode 100644 index 0000000000..a44fe91dd3 --- /dev/null +++ b/meta/recipes-devtools/git/git/0001-reflog-rename-unreachable.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | From 639cd8db63b07c958062bde4d3823dadbf469b0b Mon Sep 17 00:00:00 2001 | ||
2 | From: "brian m. carlson" <sandals@crustytoothpaste.net> | ||
3 | Date: Sun, 17 Nov 2024 01:31:49 +0000 | ||
4 | Subject: [PATCH] reflog: rename unreachable | ||
5 | |||
6 | In C23, "unreachable" is a macro that invokes undefined behavior if it | ||
7 | is invoked. To make sure that our code compiles on a variety of C | ||
8 | versions, rename unreachable to "is_unreachable". | ||
9 | |||
10 | Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> | ||
11 | Signed-off-by: Junio C Hamano <gitster@pobox.com> | ||
12 | |||
13 | Upstream-Status: Backport [v2.48.0 639cd8db63b07c958062bde4d3823dadbf469b0b] | ||
14 | Signed-off-by: Martin Jansa <martin.jansa@gmail.com> | ||
15 | --- | ||
16 | reflog.c | 4 ++-- | ||
17 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
18 | |||
19 | diff --git a/reflog.c b/reflog.c | ||
20 | index 875ac1aa66..aeab78c9b7 100644 | ||
21 | --- a/reflog.c | ||
22 | +++ b/reflog.c | ||
23 | @@ -210,7 +210,7 @@ static void mark_reachable(struct expire_reflog_policy_cb *cb) | ||
24 | cb->mark_list = leftover; | ||
25 | } | ||
26 | |||
27 | -static int unreachable(struct expire_reflog_policy_cb *cb, struct commit *commit, struct object_id *oid) | ||
28 | +static int is_unreachable(struct expire_reflog_policy_cb *cb, struct commit *commit, struct object_id *oid) | ||
29 | { | ||
30 | /* | ||
31 | * We may or may not have the commit yet - if not, look it | ||
32 | @@ -265,7 +265,7 @@ int should_expire_reflog_ent(struct object_id *ooid, struct object_id *noid, | ||
33 | return 1; | ||
34 | case UE_NORMAL: | ||
35 | case UE_HEAD: | ||
36 | - if (unreachable(cb, old_commit, ooid) || unreachable(cb, new_commit, noid)) | ||
37 | + if (is_unreachable(cb, old_commit, ooid) || is_unreachable(cb, new_commit, noid)) | ||
38 | return 1; | ||
39 | break; | ||
40 | } | ||
diff --git a/meta/recipes-devtools/git/git_2.44.4.bb b/meta/recipes-devtools/git/git_2.44.4.bb index 66936417e1..3c94667382 100644 --- a/meta/recipes-devtools/git/git_2.44.4.bb +++ b/meta/recipes-devtools/git/git_2.44.4.bb | |||
@@ -11,6 +11,8 @@ PROVIDES:append:class-native = " git-replacement-native" | |||
11 | SRC_URI = "${KERNELORG_MIRROR}/software/scm/git/git-${PV}.tar.gz;name=tarball \ | 11 | SRC_URI = "${KERNELORG_MIRROR}/software/scm/git/git-${PV}.tar.gz;name=tarball \ |
12 | file://fixsort.patch \ | 12 | file://fixsort.patch \ |
13 | file://0001-config.mak.uname-do-not-force-RHEL-7-specific-build-.patch \ | 13 | file://0001-config.mak.uname-do-not-force-RHEL-7-specific-build-.patch \ |
14 | file://0001-reflog-rename-unreachable.patch \ | ||
15 | file://0001-index-pack-rename-struct-thread_local.patch \ | ||
14 | " | 16 | " |
15 | 17 | ||
16 | SRC_URI:append:class-nativesdk = " \ | 18 | SRC_URI:append:class-nativesdk = " \ |