1 From 86e37c1c09c23924c4e055a3d4b8c79f19cd0599 Mon Sep 17 00:00:00 2001
2 From: Maximilian Bosch <maximilian@mbosch.me>
3 Date: Mon, 10 Aug 2020 21:33:39 +0200
4 Subject: [PATCH] Remove references to dropped `sys_nerr` & `sys_errlist` for
7 According to the release-notes[1], `strerror(3)` should be used. This is
8 already the case, however the source tries to be backwards-compatible by
9 supporting `sys_nerr` & `sys_errlist` which breaks compilation
12 Simply using `strerror` fixes the problems.
14 [1] https://sourceware.org/pipermail/libc-announce/2020/000029.html
16 utils.c | 12 +-----------
17 1 file changed, 1 insertion(+), 11 deletions(-)
19 diff --git a/utils.c b/utils.c
20 index 3ec70b6..430f027 100644
23 @@ -2003,7 +2003,6 @@ int n;
25 #ifdef HAVE_SYS_ERRLIST
26 extern char *sys_errlist[];
27 - extern int sys_nerr;
31 @@ -2019,16 +2018,7 @@ int errnum;
32 sprintf(buf, "Error %d", errnum);
35 - if (errnum < 0 || errnum > sys_nerr) {
36 - sprintf(buf, "Error %d (!)", errnum);
40 - return strerror(errnum);
42 - return sys_errlist[errnum];
45 + return strerror(errnum);