From 1b9b5f8bfd4fb3f524e962679a4e8f5a92887d0d Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Sat, 23 Feb 2008 09:03:22 +0000 Subject: [PATCH] backport: put pointers to bdb open() into parentheses, so they won't be macro-expanded as libc open. --- src/compat/convert.c | 2 +- src/drv_maildir.c | 4 ++-- src/mdconvert.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compat/convert.c b/src/compat/convert.c index b8f584c..0ed1ba2 100644 --- a/src/compat/convert.c +++ b/src/compat/convert.c @@ -145,7 +145,7 @@ convert( config_t *box ) fputs( "dbcreate failed\n", stderr ); goto err2; } - if (db->open( db, 0, iumname, 0, DB_HASH, 0, 0 )) { + if ((db->open)( db, 0, iumname, 0, DB_HASH, 0, 0 )) { fputs( "cannot open db\n", stderr ); db->close( db, 0 ); goto err2; diff --git a/src/drv_maildir.c b/src/drv_maildir.c index f433f6a..e6cf08d 100644 --- a/src/drv_maildir.c +++ b/src/drv_maildir.c @@ -499,7 +499,7 @@ maildir_scan( maildir_store_t *ctx, msglist_t *msglist ) fputs( "Maildir error: db_create() failed\n", stderr ); return DRV_BOX_BAD; } - if (tdb->open( tdb, 0, 0, 0, DB_HASH, DB_CREATE, 0 )) { + if ((tdb->open)( tdb, 0, 0, 0, DB_HASH, DB_CREATE, 0 )) { fputs( "Maildir error: tdb->open() failed\n", stderr ); tdb->close( tdb, 0 ); return DRV_BOX_BAD; @@ -783,7 +783,7 @@ maildir_select( store_t *gctx, int minuid, int maxuid, int *excs, int nexcs ) fputs( "Maildir error: db_create() failed\n", stderr ); goto bork; } - if ((ret = ctx->db->open( ctx->db, 0, uvpath, 0, DB_HASH, DB_CREATE, 0 ))) { + if ((ret = (ctx->db->open)( ctx->db, 0, uvpath, 0, DB_HASH, DB_CREATE, 0 ))) { ctx->db->err( ctx->db, ret, "Maildir error: db->open(%s)", uvpath ); dbork: ctx->db->close( ctx->db, 0 ); diff --git a/src/mdconvert.c b/src/mdconvert.c index 12ff788..2de59ed 100644 --- a/src/mdconvert.c +++ b/src/mdconvert.c @@ -96,7 +96,7 @@ convert( const char *box, int altmap ) fputs( "Error: db_create() failed\n", stderr ); goto tbork; } - if ((ret = db->open( db, 0, dbpath, 0, DB_HASH, DB_CREATE, 0 ))) { + if ((ret = (db->open)( db, 0, dbpath, 0, DB_HASH, DB_CREATE, 0 ))) { db->err( db, ret, "Error: db->open(%s)", dbpath ); dbork: db->close( db, 0 );