From: Howard Chu Date: Sun, 29 Aug 1999 01:56:00 +0000 (+0000) Subject: Define strerror() if it doesn't exist. X-Git-Tag: TWEB_OL_BASE~88 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9a58202116350f7a52a27e78491b07045ebeacc6;p=openldap Define strerror() if it doesn't exist. --- 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 */