From: André Malo Date: Sat, 22 Feb 2003 15:25:44 +0000 (+0000) Subject: Fix suexec compile error under SUNOS4, where strerror() doesn't exist. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=05446e8dd9d9494cf692006f441df61c46291bb5;p=thirdparty%2Fapache%2Fhttpd.git Fix suexec compile error under SUNOS4, where strerror() doesn't exist. PR: 5913, 9977 Submitted by: Jonathan W Miner git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@98756 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/CHANGES b/src/CHANGES index 706783308b9..6f11ce6d2f4 100644 --- a/src/CHANGES +++ b/src/CHANGES @@ -1,5 +1,9 @@ Changes with Apache 1.3.28 + *) Fix suexec compile error under SUNOS4, where strerror() doesn't + exist. PR 5913, 9977. + [Jonathan W Miner ] + *) Unix build: Add support for environment variable EXTRA_LDFLAGS_SHLIB, which allows the user to add to the hard-coded ld flags specified for DSOs. Compare with the existing LDFLAGS_SHLIB diff --git a/src/support/suexec.c b/src/support/suexec.c index 07bcb5cc7ff..39196a72089 100644 --- a/src/support/suexec.c +++ b/src/support/suexec.c @@ -111,6 +111,11 @@ int initgroups(const char *name, gid_t basegid) } #endif +#if defined(NEED_STRERROR) +extern char *sys_errlist[]; +#define strerror(x) sys_errlist[(x)] +#endif + #if defined(PATH_MAX) #define AP_MAXPATH PATH_MAX #elif defined(MAXPATHLEN)