zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ph...@apache.org
Subject svn commit: r1214537 - in /zookeeper/trunk: CHANGES.txt src/c/src/zookeeper.c
Date Wed, 14 Dec 2011 23:11:53 GMT
Author: phunt
Date: Wed Dec 14 23:11:53 2011
New Revision: 1214537

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

Modified:
    zookeeper/trunk/CHANGES.txt
    zookeeper/trunk/src/c/src/zookeeper.c

Modified: zookeeper/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/zookeeper/trunk/CHANGES.txt?rev=1214537&r1=1214536&r2=1214537&view=diff
==============================================================================
--- zookeeper/trunk/CHANGES.txt (original)
+++ zookeeper/trunk/CHANGES.txt Wed Dec 14 23:11:53 2011
@@ -78,6 +78,9 @@ BUGFIXES:
   (phunt and breed via mahadev)
 
   ZOOKEEPER-1269. Multi deserialization issues. (Camille Fournier via mahadev)
+
+  ZOOKEEPER-1323. c client doesn't compile on freebsd
+  (michi mutsuzaki via phunt)
  
 IMPROVEMENTS:
 

Modified: zookeeper/trunk/src/c/src/zookeeper.c
URL: http://svn.apache.org/viewvc/zookeeper/trunk/src/c/src/zookeeper.c?rev=1214537&r1=1214536&r2=1214537&view=diff
==============================================================================
--- zookeeper/trunk/src/c/src/zookeeper.c (original)
+++ zookeeper/trunk/src/c/src/zookeeper.c Wed Dec 14 23:11:53 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