diff options
Diffstat (limited to 'security/heimdal/patches/patch-af')
-rw-r--r-- | security/heimdal/patches/patch-af | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/security/heimdal/patches/patch-af b/security/heimdal/patches/patch-af new file mode 100644 index 00000000000..0746db4c673 --- /dev/null +++ b/security/heimdal/patches/patch-af @@ -0,0 +1,37 @@ +$NetBSD: patch-af,v 1.1 2004/02/22 11:59:50 markd Exp $ + +--- lib/hdb/db3.c.orig 2001-08-09 20:41:48.000000000 +1200 ++++ lib/hdb/db3.c +@@ -37,7 +37,13 @@ RCSID("$Id: db3.c,v 1.8 2001/08/09 08:41 + + #if HAVE_DB3 + ++#if defined(HAVE_DB4_DB_H) ++#include <db4/db.h> ++#elif defined(HAVE_DB3_DB_H) ++#include <db3/db.h> ++#else + #include <db.h> ++#endif + + static krb5_error_code + DB_close(krb5_context context, HDB *db) +@@ -262,10 +268,18 @@ DB_open(krb5_context context, HDB *db, i + } + db_create(&d, NULL, 0); + db->db = d; ++#if defined(HAVE_DB4_DB_H) ++ if ((ret = d->open(db->db, NULL, fn, NULL, DB_BTREE, myflags, mode))) { ++#else + if ((ret = d->open(db->db, fn, NULL, DB_BTREE, myflags, mode))) { ++#endif + if(ret == ENOENT) + /* try to open without .db extension */ ++#if defined(HAVE_DB4_DB_H) ++ if (d->open(db->db, NULL, db->name, NULL, DB_BTREE, myflags, mode)) { ++#else + if (d->open(db->db, db->name, NULL, DB_BTREE, myflags, mode)) { ++#endif + free(fn); + krb5_set_error_string(context, "opening %s: %s", + db->name, strerror(ret)); |