You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2003/07/09 21:03:27 UTC

DO NOT REPLY [Bug 21443] New: - compilation of mod_auth_db.c fails for Berkeley DB version 4

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21443>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21443

compilation of mod_auth_db.c fails for Berkeley DB version 4

           Summary: compilation of mod_auth_db.c fails for Berkeley DB
                    version 4
           Product: Apache httpd-1.3
           Version: 1.3.27
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Other mods
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: frank.migge@oracle.com


Symptom: Fatal compilation error
--------------------------------

[inet-hq01:/tmp/apache_1.3.27/src/modules/standard]>make
gcc -c -I../../../../mm-1.3.0 -I../../os/unix -I../../include -
I/usr/local/ssl/include  -DSOLARIS2=280 -DMOD_SSL=208114 -DEAPI -DEAPI_MM -
DUSE_EXPAT -I../../lib/expat-lite `../../apaci` mod_auth_db.c
mod_auth_db.c: In function `get_db_pw':
mod_auth_db.c:176: warning: passing arg 2 of pointer to function from 
incompatible pointer type
mod_auth_db.c:176: warning: passing arg 4 of pointer to function makes pointer 
from integer without a cast
mod_auth_db.c:176: too few arguments to function
*** Error code 1
make: Fatal error: Command failed for target `mod_auth_db.o'

Cause: The following code in mod_auth_db.c (starting line 173):
---------------------------------------------------------------

#if defined(DB3) || defined(DB4)
    if (   db_create(&f, NULL, 0) != 0
        || f->open(f, auth_dbpwfile, NULL, DB_HASH, DB_RDONLY, 0664) != 0) {


Reason: missing second argument on the DB open() call as defined in the
-----------------------------------------------------------------------
v. 4 docu: (see http://www.sleepycat.com/docs/ref/simple_tut/open.html)
-----------------------------------------------------------------------

        if ((ret = dbp->open(dbp,
            NULL, DATABASE, NULL, DB_BTREE, DB_CREATE, 0664)) != 0) {


Solution: Replace lines 173-175 with the code below:
----------------------------------------------------

#if defined(DB4)
    if (   db_create(&f, NULL, 0) != 0
        || f->open(f, NULL, auth_dbpwfile, NULL, DB_HASH, DB_RDONLY, 0664) != 0)
 {
#elif defined(DB3)
    if (   db_create(&f, NULL, 0) != 0
        || f->open(f, auth_dbpwfile, NULL, DB_HASH, DB_RDONLY, 0664) != 0) {

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org