Package: caftools Version: 2.0.3-1 Severity: normal Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu hirsute ubuntu-patch
Hi, caftools currently FTBFS against glibc 2.32, which is used in the development release of Ubuntu (and should be in Debian soon). This is because it uses sys_errlist instead of strerror(), which is also supported in earlier versions of glibc. In Ubuntu, the attached patch was applied to achieve the following: * d/p/glibc_2.32.patch: Use strerror() instead of sys_errlist/sys_nerr to fix FTBFS with glibc >= 2.32. Thanks for considering the patch. Logan
diff -Nru caftools-2.0.3/debian/patches/glibc_2.32.patch caftools-2.0.3/debian/patches/glibc_2.32.patch --- caftools-2.0.3/debian/patches/glibc_2.32.patch 1969-12-31 19:00:00.000000000 -0500 +++ caftools-2.0.3/debian/patches/glibc_2.32.patch 2021-04-06 15:56:49.000000000 -0400 @@ -0,0 +1,59 @@ +--- a/src/acedb/messubs.c ++++ b/src/acedb/messubs.c +@@ -268,10 +268,6 @@ + char *messbuf2 = &messbuf[BUFSIZE/2]; + static int total = 50 ; + /* extern int errno ; */ +-#if !defined(MACINTOSH) && !defined(__linux__) +- extern char *sys_errlist[] ; +- extern int sys_nerr ; +-#endif + + messFlag = TRUE ; + +@@ -284,15 +280,16 @@ + messdump ("internal system error : %s", messbuf2) ; + } + #if !defined(MACINTOSH) +- else if (errno < sys_nerr) +- { messout ("%s : %s", messbuf2, sys_errlist[errno]) ; +- messdump ("%s : %s", messbuf2, sys_errlist[errno]) ; ++ else ++ { messout ("%s : %s", messbuf2, strerror(errno)) ; ++ messdump ("%s : %s", messbuf2, strerror(errno)) ; + } +-#endif ++#else + else + { messout ("%s : system error %d", messbuf2, errno) ; + messdump ("%s : system error %d", messbuf2, errno) ; + } ++#endif + + invokeDebugger () ; + errno = 0 ; +@@ -312,10 +309,6 @@ + extern void crashOut (char* text) ; + #else + /* extern int errno ; */ +-#if !defined(__linux__) +- extern char *sys_errlist[] ; +- extern int sys_nerr ; +-#endif + #endif + + if (messcrashbuf) +@@ -330,11 +323,8 @@ + crashOut (crashText) ; + #else + messbeep(); +- if (errno <= 0 || errno >= sys_nerr) +- fprintf (stderr,"!! FATAL ERROR %d: ", errno) ; +- else +- fprintf (stderr,"!! FATAL ERROR: system error %d %s \n", +- errno, sys_errlist[errno]) ; ++ fprintf (stderr,"!! FATAL ERROR: system error %d %s \n", ++ errno, strerror(errno)) ; + fprintf (stderr, "!! %s\n", crashText) ; + #if !defined(MESSCLEAN) + graphOut (messbuf) ; /* to display on screen */ diff -Nru caftools-2.0.3/debian/patches/series caftools-2.0.3/debian/patches/series --- caftools-2.0.3/debian/patches/series 2020-05-19 10:14:05.000000000 -0400 +++ caftools-2.0.3/debian/patches/series 2021-04-06 15:53:55.000000000 -0400 @@ -1,3 +1,4 @@ messubs.patch autoconf.patch do_not_fail_building_man_pages.patch +glibc_2.32.patch