diff -Nru csh-20110502/debian/changelog csh-20110502/debian/changelog --- csh-20110502/debian/changelog 2020-07-23 10:41:59.000000000 +0200 +++ csh-20110502/debian/changelog 2021-04-23 15:35:22.000000000 +0200 @@ -1,3 +1,12 @@ +csh (20110502-6ubuntu1) devel; urgency=medium + + * Fix FTBFS with glibc 2.32: sys_siglist[] and sys_sigabbrev[] have been + deprecated in favor of strsignal() + - Refresh d/p/09_sys_signame.diff + - Add d/p/glibc-strsignal.diff + + -- Lukas Märdian Fri, 23 Apr 2021 15:35:22 +0200 + csh (20110502-6) unstable; urgency=medium * Patch from Etienne Mollier for FTBFS with gcc10. Closes: #957113 diff -Nru csh-20110502/debian/control csh-20110502/debian/control --- csh-20110502/debian/control 2020-07-23 10:41:59.000000000 +0200 +++ csh-20110502/debian/control 2021-04-23 15:35:22.000000000 +0200 @@ -1,7 +1,8 @@ Source: csh Section: shells Priority: optional -Maintainer: Alastair McKinstry +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Alastair McKinstry Standards-Version: 4.5.0 Homepage: https://www.openbsd.org/cgi-bin/cvsweb/src/bin/csh/ Vcs-Browser: https://salsa.debian.org:/mckinstry/bsd-csh.git diff -Nru csh-20110502/debian/patches/09_sys_signame.diff csh-20110502/debian/patches/09_sys_signame.diff --- csh-20110502/debian/patches/09_sys_signame.diff 2020-07-23 10:41:59.000000000 +0200 +++ csh-20110502/debian/patches/09_sys_signame.diff 2021-04-23 15:35:22.000000000 +0200 @@ -1,36 +1,24 @@ -Description: Replace BSD-specific sys_signame with GNU-specific sys_sigabbrev +Description: Replace BSD-specific sys_signame with GNU-specific strsignal Forwarded: not-needed Author: Matej Vela -Last-Update: 2011-05-13 +Author: Lukas Märdian +Last-Update: 2021-04-23 Index: csh-20110502/proc.c =================================================================== --- csh-20110502.orig/proc.c +++ csh-20110502/proc.c -@@ -38,6 +38,12 @@ - #include - #include - -+/* -+ * GNU libc doesn't expose sys_sigabbrev in headers, but it's been in use for -+ * a while: . -+ */ -+extern const char *const sys_sigabbrev[]; -+ - #include "csh.h" - #include "dir.h" - #include "proc.h" @@ -945,16 +951,22 @@ signum = atoi(short2str(v[1])); if (signum < 0 || signum >= NSIG) stderror(ERR_NAME | ERR_BADSIG); - else if (signum == 0) - (void) fputc('0', cshout); /* 0's symbolic name is '0' */ -+ else if (sys_sigabbrev[signum] == NULL) ++ else if (strsignal(signum) == NULL) + (void) fprintf(cshout, "%d", signum); else - (void) fprintf(cshout, "%s ", sys_signame[signum]); -+ (void) fprintf(cshout, "%s ", sys_sigabbrev[signum]); ++ (void) fprintf(cshout, "%s ", strsignal(signum)); } else { - for (signum = 1; signum < NSIG; signum++) { - (void) fprintf(cshout, "%s ", sys_signame[signum]); @@ -39,14 +27,14 @@ - } + int cur = 0, len; + for (signum = 1; signum < NSIG; signum++) -+ if (sys_sigabbrev[signum]) { -+ len = strlen(sys_sigabbrev[signum]) + 1; ++ if (strsignal(signum)) { ++ len = strlen(strsignal(signum)) + 1; + cur += len; + if (cur >= 80 - 1) { + (void) fputc('\n', cshout); + cur = len; + } -+ (void) fprintf(cshout, "%s ", sys_sigabbrev[signum]); ++ (void) fprintf(cshout, "%s ", strsignal(signum)); + } } (void) fputc('\n', cshout); @@ -58,10 +46,10 @@ - if (!strcasecmp(sys_signame[signum], name) || - (strlen(name) > 3 && !strncasecmp("SIG", name, 3) && - !strcasecmp(sys_signame[signum], name + 3))) -+ if (sys_sigabbrev[signum] && \ -+ (!strcasecmp(sys_sigabbrev[signum], name) || ++ if (strsignal(signum) && \ ++ (!strcasecmp(strsignal(signum), name) || + (strlen(name) > 3 && !strncasecmp("SIG", name, 3) && -+ !strcasecmp(sys_sigabbrev[signum], name + 3)))) ++ !strcasecmp(strsignal(signum), name + 3)))) break; if (signum == NSIG) { diff -Nru csh-20110502/debian/patches/glibc-strsignal.diff csh-20110502/debian/patches/glibc-strsignal.diff --- csh-20110502/debian/patches/glibc-strsignal.diff 1970-01-01 02:00:00.000000000 +0200 +++ csh-20110502/debian/patches/glibc-strsignal.diff 2021-04-23 15:35:22.000000000 +0200 @@ -0,0 +1,21 @@ +Description: Use strsignal() in favor of sys_siglist[] + The sys_siglist, _sys_siglist and sys_sigabbrev arrays have been deprecated. + All programs should use strsignal() instead. + . +Author: Lukas Märdian +Forwarded: no +Last-Update: 2021-04-23 + +--- +--- csh-20110502.orig/proc.c ++++ csh-20110502/proc.c +@@ -732,8 +732,7 @@ pprint(struct process *pp, bool flag) + && (reason != SIGPIPE + || (pp->p_flags & PPOU) == 0))) { + (void) fprintf(cshout, format, +- sys_siglist[(unsigned char) +- pp->p_reason]); ++ strsignal(pp->p_reason)); + hadnl = 0; + } + break; diff -Nru csh-20110502/debian/patches/series csh-20110502/debian/patches/series --- csh-20110502/debian/patches/series 2020-07-23 10:41:59.000000000 +0200 +++ csh-20110502/debian/patches/series 2021-04-23 15:33:05.000000000 +0200 @@ -12,3 +12,4 @@ 12_glibc_union_wait.diff 13_fix_arithmetic_precedence.diff pointer_deref_comparison.patch +glibc-strsignal.diff