Bug#979462: aplus-fsf: FTBFS against glibc 2.32

2021-01-06 Thread Neil Roeth

On 1/6/21 5:11 PM, Logan Rosen wrote:

Package: aplus-fsf
Version: 4.22.1-10.1
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu hirsute ubuntu-patch
X-Debbugs-Cc: lo...@ubuntu.com

Hi,

aplus-fsf 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 has some improperly guarded usage of sys_errlist
instead of strerror().

In Ubuntu, the attached patch was applied to achieve the following:

   * Fix FTBFS against glibc 2.32 by using strerror() instead of sys_errlist.

Thanks for considering the patch.

Logan


Thanks, Logan.

This works with glibc 2.31.  I will upload a new package once 2.32 is in 
Debian unstable.


Neil



Bug#979462: aplus-fsf: FTBFS against glibc 2.32

2021-01-06 Thread Logan Rosen
Package: aplus-fsf
Version: 4.22.1-10.1
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu hirsute ubuntu-patch
X-Debbugs-Cc: lo...@ubuntu.com

Hi,

aplus-fsf 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 has some improperly guarded usage of sys_errlist
instead of strerror().

In Ubuntu, the attached patch was applied to achieve the following:

  * Fix FTBFS against glibc 2.32 by using strerror() instead of sys_errlist.

Thanks for considering the patch.

Logan
only in patch2:
unchanged:
--- aplus-fsf-4.22.1.orig/src/MSIPC/MSProtocolConnection.C
+++ aplus-fsf-4.22.1/src/MSIPC/MSProtocolConnection.C
@@ -129,8 +129,13 @@
   if (getpeername(fd(),(struct sockaddr *)&sockname,&socklen)) 
 #endif
{
+#if defined (HAVE_STRERROR)
+ char *errstr = strerror(errno);
+#else
+ char *errstr = (errno sys_nerr)
- str = "unknown error";
-   else
 #ifdef HAVE_STRERROR
-  str = strerror(errnum);
+str = strerror(errnum);
 #else
+if (errnum < 1 || errnum > sys_nerr)
+  str = "unknown error";
+else
  str = sys_errlist[errnum];
 #endif
for (z = str; *z != (char) NULL &&