rpms/netatalk/devel netatalk-2.0.3-open_call.patch, NONE, 1.1 netatalk.spec, 1.37, 1.38 netatalk-2.0.3-build_open.patch, 1.1, NONE

Maros Barabas (mbarabas) fedora-extras-commits at redhat.com
Mon Sep 17 13:30:25 UTC 2007


Author: mbarabas

Update of /cvs/extras/rpms/netatalk/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18813

Modified Files:
	netatalk.spec 
Added Files:
	netatalk-2.0.3-open_call.patch 
Removed Files:
	netatalk-2.0.3-build_open.patch 
Log Message:
* Wed Sep 12 2007 Maros Barabas <mbarabas at redhat.com> -4:2.0.3-15
- patch to build on FC, bad open call 


netatalk-2.0.3-open_call.patch:

--- NEW FILE netatalk-2.0.3-open_call.patch ---
diff -up netatalk-2.0.3/libatalk/cnid/cdb/cnid_cdb_open.c.open_call netatalk-2.0.3/libatalk/cnid/cdb/cnid_cdb_open.c
--- netatalk-2.0.3/libatalk/cnid/cdb/cnid_cdb_open.c.open_call	2007-09-17 15:21:26.000000000 +0200
+++ netatalk-2.0.3/libatalk/cnid/cdb/cnid_cdb_open.c	2007-09-17 15:21:43.000000000 +0200
@@ -131,9 +131,9 @@ static int  my_associate (DB *p, DB *s,
 static int my_open(DB * p, const char *f, const char *d, DBTYPE t, u_int32_t flags, int mode)
 {
 #if DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)
-    return p->open(p, NULL, f, d, t, flags, mode);
+    return (p->open)(p, NULL, f, d, t, flags, mode);
 #else
-    return p->open(p, f, d, t, flags, mode);
+    return (p->open)(p, f, d, t, flags, mode);
 #endif
 }
 
@@ -275,7 +275,7 @@ struct _cnid_db *cnid_cdb_open(const cha
     }
 
     /* Open the database environment. */
-    if ((rc = db->dbenv->open(db->dbenv, path, DBOPTIONS, 0666 & ~mask)) != 0) {
+    if ((rc = (db->dbenv->open)(db->dbenv, path, DBOPTIONS, 0666 & ~mask)) != 0) {
 	LOG(log_error, logtype_default, "cnid_open: dbenv->open (rw) of %s failed: %s", path, db_strerror(rc));
 	/* FIXME: This should probably go. Even if it worked, any use for a read-only DB? Didier? */
         if (rc == DB_RUNRECOVERY) {
@@ -288,10 +288,10 @@ struct _cnid_db *cnid_cdb_open(const cha
         /* We can't get a full transactional environment, so multi-access
          * is out of the question.  Let's assume a read-only environment,
          * and try to at least get a shared memory pool. */
-        if ((rc = db->dbenv->open(db->dbenv, path, DB_INIT_MPOOL, 0666 & ~mask)) != 0) {
+        if ((rc = (db->dbenv->open)(db->dbenv, path, DB_INIT_MPOOL, 0666 & ~mask)) != 0) {
             /* Nope, not a MPOOL, either.  Last-ditch effort: we'll try to
              * open the environment with no flags. */
-            if ((rc = db->dbenv->open(db->dbenv, path, 0, 0666 & ~mask)) != 0) {
+            if ((rc = (db->dbenv->open)(db->dbenv, path, 0, 0666 & ~mask)) != 0) {
                 LOG(log_error, logtype_default, "cnid_open: dbenv->open of %s failed: %s", path, db_strerror(rc));
                 goto fail_lock;
             }
diff -up netatalk-2.0.3/libatalk/cnid/db3/cnid_db3_open.c.open_call netatalk-2.0.3/libatalk/cnid/db3/cnid_db3_open.c
--- netatalk-2.0.3/libatalk/cnid/db3/cnid_db3_open.c.open_call	2007-09-17 15:14:36.000000000 +0200
+++ netatalk-2.0.3/libatalk/cnid/db3/cnid_db3_open.c	2007-09-17 15:15:06.000000000 +0200
@@ -133,9 +133,9 @@ static int my_yield(void)
 static int my_open(DB * p, const char *f, const char *d, DBTYPE t, u_int32_t flags, int mode)
 {
 #if DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)
-    return p->open(p, NULL, f, d, t, flags | DB_AUTO_COMMIT, mode);
+    return (p->open)(p, NULL, f, d, t, flags | DB_AUTO_COMMIT, mode);
 #else
-    return p->open(p, f, d, t, flags, mode);
+    return (p->open)(p, f, d, t, flags, mode);
 #endif
 }
 
@@ -350,7 +350,7 @@ struct _cnid_db *cnid_db3_open(const cha
 #endif /* DB_VERSION_MINOR > 1 */
 
     /* Open the database environment. */
-    if ((rc = db->dbenv->open(db->dbenv, path, DBOPTIONS, 0666 & ~mask)) != 0) {
+    if ((rc = (db->dbenv->open)(db->dbenv, path, DBOPTIONS, 0666 & ~mask)) != 0) {
         if (rc == DB_RUNRECOVERY) {
             /* This is the mother of all errors.  We _must_ fail here. */
             LOG(log_error, logtype_default,
@@ -361,10 +361,10 @@ struct _cnid_db *cnid_db3_open(const cha
         /* We can't get a full transactional environment, so multi-access
          * is out of the question.  Let's assume a read-only environment,
          * and try to at least get a shared memory pool. */
-        if ((rc = db->dbenv->open(db->dbenv, path, DB_INIT_MPOOL, 0666 & ~mask)) != 0) {
+        if ((rc = (db->dbenv->open)(db->dbenv, path, DB_INIT_MPOOL, 0666 & ~mask)) != 0) {
             /* Nope, not a MPOOL, either.  Last-ditch effort: we'll try to
              * open the environment with no flags. */
-            if ((rc = db->dbenv->open(db->dbenv, path, 0, 0666 & ~mask)) != 0) {
+            if ((rc = (db->dbenv->open)(db->dbenv, path, 0, 0666 & ~mask)) != 0) {
                 LOG(log_error, logtype_default, "cnid_open: dbenv->open of %s failed: %s", path, db_strerror(rc));
                 goto fail_lock;
             }
diff -up netatalk-2.0.3/bin/cnid/cnid_index.c.open_call netatalk-2.0.3/bin/cnid/cnid_index.c
--- netatalk-2.0.3/bin/cnid/cnid_index.c.open_call	2007-09-17 15:14:49.000000000 +0200
+++ netatalk-2.0.3/bin/cnid/cnid_index.c	2007-09-17 15:15:35.000000000 +0200
@@ -123,9 +123,9 @@ static int db_compat_open(DB *db, char *
     int ret;
 
 #if DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)
-    ret = db->open(db, db_txn, file, name, type, DB_CREATE, mode); 
+    ret = (db->open)(db, db_txn, file, name, type, DB_CREATE, mode); 
 #else
-    ret = db->open(db,       file, name, type, DB_CREATE, mode); 
+    ret = (db->open)(db,       file, name, type, DB_CREATE, mode); 
 #endif
 
     if (ret) {
@@ -353,7 +353,7 @@ static int dbif_env_init(void)
         db_env->set_errfile(db_env, db_errlog); 
     db_env->set_verbose(db_env, DB_VERB_RECOVERY, 1);
     db_env->set_verbose(db_env, DB_VERB_CHKPOINT, 1);
-    if ((ret = db_env->open(db_env, ".", DBOPTIONS | DB_PRIVATE | DB_RECOVER, 0))) {
+    if ((ret = (db_env->open)(db_env, ".", DBOPTIONS | DB_PRIVATE | DB_RECOVER, 0))) {
         LOG(log_error, logtype_cnid, "error opening DB environment: %s", 
             db_strerror(ret));
         db_env->close(db_env, 0);
@@ -379,7 +379,7 @@ static int dbif_env_init(void)
     }
     if (db_errlog != NULL)
         db_env->set_errfile(db_env, db_errlog);
-    if ((ret = db_env->open(db_env, ".", DBOPTIONS , 0))) {
+    if ((ret = (db_env->open)(db_env, ".", DBOPTIONS , 0))) {
         LOG(log_error, logtype_cnid, "error opening DB environment after recovery: %s",
             db_strerror(ret));
         db_env->close(db_env, 0);
diff -up netatalk-2.0.3/etc/cnid_dbd/dbif.c.open_call netatalk-2.0.3/etc/cnid_dbd/dbif.c
--- netatalk-2.0.3/etc/cnid_dbd/dbif.c.open_call	2007-09-17 15:14:59.000000000 +0200
+++ netatalk-2.0.3/etc/cnid_dbd/dbif.c	2007-09-17 15:16:54.000000000 +0200
@@ -77,9 +77,9 @@ static int db_compat_open(DB *db, char *
     int ret;
 
 #if DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)
-    ret = db->open(db, db_txn, file, name, type, DB_CREATE, mode); 
+    ret = (db->open)(db, db_txn, file, name, type, DB_CREATE, mode); 
 #else
-    ret = db->open(db,       file, name, type, DB_CREATE, mode); 
+    ret = (db->open)(db,       file, name, type, DB_CREATE, mode); 
 #endif
 
     if (ret) {
@@ -164,7 +164,7 @@ int dbif_env_init(struct db_param *dbp)
         db_env->set_errfile(db_env, db_errlog); 
     db_env->set_verbose(db_env, DB_VERB_RECOVERY, 1);
     db_env->set_verbose(db_env, DB_VERB_CHKPOINT, 1);
-    if ((ret = db_env->open(db_env, ".", DBOPTIONS | DB_PRIVATE | DB_RECOVER, 0))) {
+    if ((ret = (db_env->open)(db_env, ".", DBOPTIONS | DB_PRIVATE | DB_RECOVER, 0))) {
         LOG(log_error, logtype_cnid, "error opening DB environment: %s", 
             db_strerror(ret));
         db_env->close(db_env, 0);
@@ -198,7 +198,7 @@ int dbif_env_init(struct db_param *dbp)
     
     if (db_errlog != NULL)
         db_env->set_errfile(db_env, db_errlog);
-    if ((ret = db_env->open(db_env, ".", DBOPTIONS , 0))) {
+    if ((ret = (db_env->open)(db_env, ".", DBOPTIONS , 0))) {
         LOG(log_error, logtype_cnid, "error opening DB environment after recovery: %s",
             db_strerror(ret));
         db_env->close(db_env, 0);


Index: netatalk.spec
===================================================================
RCS file: /cvs/extras/rpms/netatalk/devel/netatalk.spec,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- netatalk.spec	12 Sep 2007 11:09:00 -0000	1.37
+++ netatalk.spec	17 Sep 2007 13:29:53 -0000	1.38
@@ -1,7 +1,7 @@
 Summary: AppleTalk networking programs
 Name:    netatalk
 Version: 2.0.3
-Release: 14%{?dist}
+Release: 15%{?dist}
 Epoch:   4
 License: GPL
 Group:   System Environment/Daemons
@@ -16,7 +16,7 @@
 Patch2:  netatalk-2.0.2-uams_no_pie.patch
 Patch3:  netatalk-2.0.2-extern_ucreator.patch
 Patch4:  netatalk-2.0.3-nodefault.patch
-Patch5:  netatalk-2.0.3-build_open.patch
+Patch5:  netatalk-2.0.3-open_call.patch
 Url:	 http://netatalk.sourceforge.net/
 Requires: pam
 Requires(post): /sbin/chkconfig /sbin/ldconfig
@@ -49,7 +49,7 @@
 %patch2  -p1 -b .uams_no_pie
 %patch3  -p1 -b .extern_ucreator
 %patch4  -p1
-%patch5  -p1 -b .build_open
+%patch5  -p1 -b .open_call
 
 ln -s ./NEWS ChangeLog
 
@@ -188,7 +188,7 @@
 %{_mandir}/man*/netatalk-config.1*
 
 %changelog
-* Wed Sep 12 2007 Maros Barabas <mbarabas at redhat.com> -4:2.0.3-14
+* Wed Sep 12 2007 Maros Barabas <mbarabas at redhat.com> -4:2.0.3-15
 - patch to build on FC, bad open call 
 
 * Tue Sep 11 2007 Maros Barabas <mbarabas at redhat.com> - 4:2.0.3-13


--- netatalk-2.0.3-build_open.patch DELETED ---




More information about the scm-commits mailing list