1 |
commit: 66de2d4026054822aab89ac443e9bc726c9aae25 |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Aug 16 21:17:38 2020 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Aug 16 22:46:25 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=66de2d40 |
7 |
|
8 |
dev-util/kbuild: fix building against glibc-2.32+ |
9 |
|
10 |
Closes: https://bugs.gentoo.org/736635 |
11 |
Package-Manager: Portage-3.0.2, Repoman-2.3.23 |
12 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
13 |
|
14 |
.../files/kbuild-0.1.9998.3407-glibc-2.32+.patch | 59 ++++++++++++++++++++++ |
15 |
dev-util/kbuild/kbuild-0.1.9998.3407.ebuild | 1 + |
16 |
2 files changed, 60 insertions(+) |
17 |
|
18 |
diff --git a/dev-util/kbuild/files/kbuild-0.1.9998.3407-glibc-2.32+.patch b/dev-util/kbuild/files/kbuild-0.1.9998.3407-glibc-2.32+.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..68a39fc68de |
21 |
--- /dev/null |
22 |
+++ b/dev-util/kbuild/files/kbuild-0.1.9998.3407-glibc-2.32+.patch |
23 |
@@ -0,0 +1,59 @@ |
24 |
+http://trac.netlabs.org/kbuild/changeset?format=diff&new=3408&old=3407&new_path=%2Ftrunk&old_path=%2Ftrunk |
25 |
+ |
26 |
+--- a/src/kash/jobs.c |
27 |
++++ b/src/kash/jobs.c |
28 |
+@@ -390,4 +390,5 @@ |
29 |
+ fmtstr(s + col, 16, "Done"); |
30 |
+ } else { |
31 |
++ const char *pszSigNm; |
32 |
+ #if JOBS |
33 |
+ if (WIFSTOPPED(ps->status)) |
34 |
+@@ -397,6 +398,7 @@ |
35 |
+ st = WTERMSIG(ps->status); |
36 |
+ st &= 0x7f; |
37 |
+- if (st < NSIG && sys_siglist[st]) |
38 |
+- scopyn(sys_siglist[st], s + col, 32); |
39 |
++ pszSigNm = st < NSIG ? strsignal(st) : NULL; |
40 |
++ if (pszSigNm) |
41 |
++ scopyn(pszSigNm, s + col, 32); |
42 |
+ else |
43 |
+ fmtstr(s + col, 16, "Signal %d", st); |
44 |
+--- a/src/kash/shinstance.h |
45 |
++++ b/src/kash/shinstance.h |
46 |
+@@ -381,10 +381,6 @@ |
47 |
+ /*# define SIGBREAK 21 */ |
48 |
+ /*# define SIGABRT 22 */ |
49 |
+- |
50 |
+-# define sys_siglist sys_signame |
51 |
++const char *strsignal(int iSig); |
52 |
+ #endif /* _MSC_VER */ |
53 |
+-#ifdef __sun__ |
54 |
+-# define sys_siglist _sys_siglist |
55 |
+-#endif |
56 |
+ #ifndef HAVE_SYS_SIGNAME |
57 |
+ extern char sys_signame[NSIG][16]; |
58 |
+--- a/src/kash/sys_signame.c |
59 |
++++ b/src/kash/sys_signame.c |
60 |
+@@ -12,5 +12,5 @@ |
61 |
+ void init_sys_signame(void) |
62 |
+ { |
63 |
+- unsigned i; |
64 |
++ unsigned i; |
65 |
+ if (sys_signame_initialized) |
66 |
+ return; |
67 |
+@@ -120,2 +120,14 @@ |
68 |
+ sys_signame_initialized = 1; |
69 |
+ } |
70 |
++ |
71 |
++#if defined(_MSC_VER) |
72 |
++const char *strsignal(int iSig) |
73 |
++{ |
74 |
++ if (!sys_signame_initialized) |
75 |
++ init_sys_signame(); |
76 |
++ if (iSig < NSIG) |
77 |
++ return sys_signame(iSig); |
78 |
++ return NULL; |
79 |
++} |
80 |
++#endif |
81 |
++ |
82 |
+ |
83 |
|
84 |
diff --git a/dev-util/kbuild/kbuild-0.1.9998.3407.ebuild b/dev-util/kbuild/kbuild-0.1.9998.3407.ebuild |
85 |
index e6a93dc696e..3c367b7ff0c 100644 |
86 |
--- a/dev-util/kbuild/kbuild-0.1.9998.3407.ebuild |
87 |
+++ b/dev-util/kbuild/kbuild-0.1.9998.3407.ebuild |
88 |
@@ -35,6 +35,7 @@ PATCHES=( |
89 |
"${FILESDIR}/${PN}-0.1.9998_pre20120806-qa.patch" |
90 |
"${FILESDIR}/${PN}-0.1.9998_pre20110817-kash-link-pthread.patch" |
91 |
"${FILESDIR}/${PN}-0.1.9998.3407-gold.patch" |
92 |
+ "${FILESDIR}/${PN}-0.1.9998.3407-glibc-2.32+.patch" |
93 |
) |
94 |
|
95 |
pkg_setup() { |