From 9a58202116350f7a52a27e78491b07045ebeacc6 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sun, 29 Aug 1999 01:56:00 +0000 Subject: [PATCH] Define strerror() if it doesn't exist. --- include/ac/errno.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/ac/errno.h b/include/ac/errno.h index 24cb5d0b38..a7b10eb5d8 100644 --- a/include/ac/errno.h +++ b/include/ac/errno.h @@ -28,6 +28,11 @@ extern char *sys_errlist[]; #endif +#ifndef HAVE_STRERROR +#define strerror(err) \ + (err) > -1 && (err) < sys_nerr ? sys_errlist[(err)] : "unknown" +#endif + extern char* strerror_r(); #endif /* _AC_ERRNO_H */ -- 2.39.5