Source: fish
Version: 2.1.0-1
Severity: important
Tags: patch
User: debian-h...@lists.debian.org
Usertags: hurd

Hi,

Currently fish FTBFS on GNU/Hurd due to usage of sys_nerr and
sys_errlist, for error strings, which is not defined on Hurd and
depreciated (but still defined on other architectures): e.g.
/usr/include/x86_64-linux-gnu/bits/sys_errlist.h
/* sys_errlist and sys_nerr are deprecated.  Use strerror instead.  */

The attached patch solves this by using strerror().

Thanks!

Index: fish-2.1.0/wutil.cpp
===================================================================
--- fish-2.1.0.orig/wutil.cpp
+++ fish-2.1.0/wutil.cpp
@@ -324,9 +324,9 @@ const char *safe_strerror(int err)
     // See #808
     return strerror(err);
 #else
-    if (err >= 0 && err < sys_nerr && sys_errlist[err] != NULL)
+    if (err)
     {
-        return sys_errlist[err];
+        return strerror(err);
     }
     else
     {

Reply via email to