[
https://issues.apache.org/jira/browse/ZOOKEEPER-1795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13794400#comment-13794400
]
Raul Gutierrez Segales commented on ZOOKEEPER-1795:
---------------------------------------------------
fwiw, happens in Fedora 19 too. this patch works for me:
{noformat}
diff --git a/src/c/tests/TestReconfigServer.cc
b/src/c/tests/TestReconfigServer.cc
index 90bf6f6..a847b37 100644
--- a/src/c/tests/TestReconfigServer.cc
+++ b/src/c/tests/TestReconfigServer.cc
@@ -16,6 +16,7 @@
*/
#include <algorithm>
#include <cppunit/extensions/HelperMacros.h>
+#include <unistd.h>
#include "zookeeper.h"
#include "Util.h"
diff --git a/src/c/tests/ZooKeeperQuorumServer.cc
b/src/c/tests/ZooKeeperQuorumServer.cc
index f8049d2..23392cd 100644
--- a/src/c/tests/ZooKeeperQuorumServer.cc
+++ b/src/c/tests/ZooKeeperQuorumServer.cc
@@ -21,6 +21,7 @@
#include <cstdlib>
#include <fstream>
#include <sstream>
+#include <unistd.h>
ZooKeeperQuorumServer::
ZooKeeperQuorumServer(uint32_t id, uint32_t numServers) :
{noformat}
> unable to build c client on ubuntu
> ----------------------------------
>
> Key: ZOOKEEPER-1795
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1795
> Project: ZooKeeper
> Issue Type: Bug
> Components: c client
> Affects Versions: 3.5.0
> Reporter: Patrick Hunt
> Priority: Blocker
> Fix For: 3.5.0
>
>
> Seems there is an issue for Ubuntu (I'm on 13.04), however I'm only seeing it
> on trunk and not branch 34
> {noformat}
> make check
> make zktest-st zktest-mt
> make[1]: Entering directory `/home/phunt/dev/svn/svn-zookeeper/src/c'
> g++ -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated
> -DUSE_STATIC_LIB -DZKSERVER_CMD="\"./tests/zkServer.sh\"" -DZOO_IPV6_ENABLED
> -g -O2 -MT zktest_st-TestReconfigServer.o -MD -MP -MF
> .deps/zktest_st-TestReconfigServer.Tpo -c -o zktest_st-TestReconfigServer.o
> `test -f 'tests/TestReconfigServer.cc' || echo
> './'`tests/TestReconfigServer.cc
> tests/TestReconfigServer.cc: In member function 'bool
> TestReconfigServer::waitForConnected(zhandle_t*, uint32_t)':
> tests/TestReconfigServer.cc:128:16: error: 'sleep' was not declared in this
> scope
> make[1]: *** [zktest_st-TestReconfigServer.o] Error 1
> make[1]: Leaving directory `/home/phunt/dev/svn/svn-zookeeper/src/c'
> make: *** [check-am] Error 2
> {noformat}
> I have
> {noformat}
> g++ --version
> g++ (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3
> Copyright (C) 2012 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.1#6144)