zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ph...@apache.org
Subject svn commit: r1214538 - in /zookeeper/branches/branch-3.4: CHANGES.txt src/c/src/zookeeper.c
Date Wed, 14 Dec 2011 23:16:46 GMT
Author: phunt
Date: Wed Dec 14 23:16:46 2011
New Revision: 1214538

URL: http://svn.apache.org/viewvc?rev=1214538&view=rev
Log:
ZOOKEEPER-1323. c client doesn't compile on freebsd (michi mutsuzaki via phunt)

Modified:
    zookeeper/branches/branch-3.4/CHANGES.txt
    zookeeper/branches/branch-3.4/src/c/src/zookeeper.c

Modified: zookeeper/branches/branch-3.4/CHANGES.txt
URL: http://svn.apache.org/viewvc/zookeeper/branches/branch-3.4/CHANGES.txt?rev=1214538&r1=1214537&r2=1214538&view=diff
==============================================================================
--- zookeeper/branches/branch-3.4/CHANGES.txt (original)
+++ zookeeper/branches/branch-3.4/CHANGES.txt Wed Dec 14 23:16:46 2011
@@ -1,3 +1,13 @@
+Release 3.4.2 - TBD
+
+Backward compatible changes:
+
+BUGFIXES: 
+
+  ZOOKEEPER-1323. c client doesn't compile on freebsd
+  (michi mutsuzaki via phunt)
+
+
 Release 3.4.1 - 2011-12-12
 
 Backward compatible changes:

Modified: zookeeper/branches/branch-3.4/src/c/src/zookeeper.c
URL: http://svn.apache.org/viewvc/zookeeper/branches/branch-3.4/src/c/src/zookeeper.c?rev=1214538&r1=1214537&r2=1214538&view=diff
==============================================================================
--- zookeeper/branches/branch-3.4/src/c/src/zookeeper.c (original)
+++ zookeeper/branches/branch-3.4/src/c/src/zookeeper.c Wed Dec 14 23:16:46 2011
@@ -442,7 +442,8 @@ static void setup_random()
 static int getaddrinfo_errno(int rc) { 
     switch(rc) {
     case EAI_NONAME:
-#if EAI_NODATA != EAI_NONAME
+// ZOOKEEPER-1323 EAI_NODATA and EAI_ADDRFAMILY are deprecated in FreeBSD.
+#if defined EAI_NODATA && EAI_NODATA != EAI_NONAME
     case EAI_NODATA:
 #endif
         return ENOENT;
@@ -578,7 +579,12 @@ int getaddrs(zhandle_t *zh)
             // ai_flags as AI_ADDRCONFIG
 #ifdef AI_ADDRCONFIG
             if ((hints.ai_flags == AI_ADDRCONFIG) && 
+// ZOOKEEPER-1323 EAI_NODATA and EAI_ADDRFAMILY are deprecated in FreeBSD.
+#ifdef EAI_ADDRFAMILY
                 ((rc ==EAI_BADFLAGS) || (rc == EAI_ADDRFAMILY))) {
+#else
+                (rc == EAI_BADFLAGS)) {
+#endif
                 //reset ai_flags to null
                 hints.ai_flags = 0;
                 //retry getaddrinfo



Mime
View raw message