Bug 9977

Summary: suexec uses strerror(), which is not in SunOS4
Product: Apache httpd-1.3 Reporter: Dai Sato <satodai>
Component: OtherAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: CLOSED FIXED    
Severity: minor CC: satodai
Priority: P3    
Version: HEAD   
Target Milestone: ---   
Hardware: Sun   
OS: Solaris   

Description Dai Sato 2002-06-19 02:41:45 UTC
in support/suexec.c, strerror() is used without any care for NEED_STRERROR.
so, it should have it's own strerror() like discribed bellow (the code is
from main/util.c):

--- suexec.c.org        Wed Jun 19 11:02:21 2002
+++ suexec.c    Wed Jun 19 11:02:21 2002
@@ -103,6 +103,19 @@
  ***********************************************************************
  */

+#ifdef NEED_STRERROR
+char *
+     strerror(int err)
+{
+
+    char *p;
+    extern char *const sys_errlist[];
+
+    p = sys_errlist[err];
+    return (p);
+}
+#endif
+
 #if defined(NEED_INITGROUPS)
 int initgroups(const char *name, gid_t basegid)
 {
Comment 1 André Malo 2003-02-13 00:10:24 UTC
It's fixed in 2.1 (using the patch provided in
http://bugs.apache.org/index.cgi/full/5913) and proposed for backport.

Thanks for the report and thanks for using Apache!
Comment 2 André Malo 2003-02-22 20:26:54 UTC
Finally fixed in 1.3 and 2.0 branch. It will appear in the next releases (1.3.28
and 2.0.45).