Try this patch as submitted by Larry Rosenbaum:

*** cyrusdb_db3.c.orig  Wed Sep 19 20:13:43 2001
--- cyrusdb_db3.c       Thu Jan 10 10:31:22 2002
***************
*** 71,76 ****
--- 71,81 ----
  
  /* --- cut here --- */
  
+ #if DB_VERSION_MAJOR >= 4
+ #define txn_checkpoint(xx1,xx2,xx3,xx4)
(xx1)->txn_checkpoint(xx1,xx2,xx3,xx4)
+ #define txn_id(xx1) (xx1)->id(xx1)
+ #endif
+ 
  static int dbinit = 0;
  static DB_ENV *dbenv;
  
***************
*** 145,151 ****
   retry:
      flags |= DB_INIT_LOCK | DB_INIT_MPOOL | 
             DB_INIT_LOG | DB_INIT_TXN;
! #if DB_VERSION_MINOR > 0
      r = dbenv->open(dbenv, dbdir, flags, 0644); 
  #else
      r = dbenv->open(dbenv, dbdir, NULL, flags, 0644); 
--- 150,156 ----
   retry:
      flags |= DB_INIT_LOCK | DB_INIT_MPOOL | 
             DB_INIT_LOG | DB_INIT_TXN;
! #if (DB_VERSION_MAJOR > 3) || ((DB_VERSION_MAJOR == 3) &&
(DB_VERSION_MINOR > 0))
      r = dbenv->open(dbenv, dbdir, flags, 0644); 
  #else
      r = dbenv->open(dbenv, dbdir, NULL, flags, 0644); 
***************
*** 205,211 ****
      assert(dbinit);
  
      do {
! #if DB_VERSION_MINOR > 0
        r = txn_checkpoint(dbenv, 0, 0, 0);
  #else
        r = txn_checkpoint(dbenv, 0, 0);
--- 210,216 ----
      assert(dbinit);
  
      do {
! #if (DB_VERSION_MAJOR > 3) || ((DB_VERSION_MAJOR == 3) &&
(DB_VERSION_MINOR > 0))
        r = txn_checkpoint(dbenv, 0, 0, 0);
  #else
        r = txn_checkpoint(dbenv, 0, 0);




> Ilya Sedelnikov wrote:
> 
> Hi,
> 
>   when trying to compile IMAPD-2.1.0-BETA with cyrus-sasl-2.0.5-BETA
> and BerkeleyDB 4.0.14 installed
> 
>   on Solaris 8,
> 
>   I get following error:
> 
>   cyrusdb_db3.c: In function `init'
> 
>   cyrusdb_db3.c:151: too many arguments to function
> 
>   Corresponding lines in cyrusdb_db3.c are
> 
> #if DB_VERSION_MINOR > 0
> 
>     r = dbenv->open(dbenv, dbdir, flags, 0644);
> 
> #else
> 
>     r = dbenv->open(dbenv, dbdir, NULL, flags, 0644);
> 
> #endif
> 
> 
> 
>    Definition of type DB_ERR, found in include file "db.h" created
> when installing BerkeleyDB 4.0.14 and
> 
>    used by "cyrusdb_db3.c" includes declaration of function "open":
> 
>    int  (*open) __P((DB_ENV *, const char *, u_int32_t, int));
> 
> 
> 
>    Note that this function has 4 parameters.
> 
>   Also, "db.h"  contains following definition
> 
>  # define DB_VERSION_MINOR 0
> 
>  So, reason for the error message I get when trying to compile
> "cyrusdb_db3.c" is clear.
> 
>  Did anyone have similar problem ?
> 
>  Does anybody know how to solve the problem ?
> 
> 
> 
>  Regards,
> 
> Ilya Sedelnikov
> 
> P.S.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 

-- 
Kenneth Murchison     Oceana Matrix Ltd.
Software Engineer     21 Princeton Place
716-662-8973 x26      Orchard Park, NY 14127
--PGP Public Key--    http://www.oceana.com/~ken/ksm.pgp

Reply via email to