www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject Re: config/7682: mod_unique_id requires the hostname of the server
Date Fri, 18 May 2001 14:21:28 GMT
[In order for any reply to be added to the PR database, you need]
[to include <apbugs@Apache.Org> in the Cc line and make sure the]
[subject line starts with the report component and number, with ]
[or without any 'Re:' prefixes (such as "general/1098:" or      ]
["Re: general/1098:").  If the subject doesn't match this       ]
[pattern, your message will be misfiled and ignored.  The       ]
["apbugs" address is not added to the Cc line of messages from  ]
[the database automatically because of the potential for mail   ]
[loops.  If you do not include this Cc, your reply may be ig-   ]
[nored unless you are responding to an explicit request from a  ]
[developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]


Synopsis: mod_unique_id requires the hostname of the server

State-Changed-From-To: open-feedback
State-Changed-By: trawick
State-Changed-When: Fri May 18 07:21:25 PDT 2001
State-Changed-Why:
I would guess that the problem is that BEOS logic is needed
in mod_unique_id.c to handle the return code from 
gethostname().  Unfortunately, certain (all?) levels of 
BeOS trigger a gethostname() failure differently than 
all other platforms on which Apache is supported.

Please try this patch to mod_unique_id:

Index: src/modules/standard/mod_unique_id.c
===================================================================
RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_unique_id.c,v
retrieving revision 1.23
diff -u -r1.23 mod_unique_id.c
--- src/modules/standard/mod_unique_id.c	2001/01/15 17:05:51	1.23
+++ src/modules/standard/mod_unique_id.c	2001/05/18 14:19:15
@@ -193,7 +193,11 @@
      * of the addresses from the main_server, since those aren't as likely to
      * be unique as the physical address of the machine
      */
+#ifdef BEOS /* BeOS returns zero as an error for gethostname */
+    if (gethostname(str, sizeof(str) - 1) == 0) {
+#else
     if (gethostname(str, sizeof(str) - 1) != 0) {
+#endif
         ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ALERT, s,
 		     "gethostname: mod_unique_id requires the "
 		     "hostname of the server");

Please let me know if you are unable to test the patch.
Maybe I can find somebody to do that.



Mime
View raw message