[
https://issues.apache.org/jira/browse/ZOOKEEPER-2210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14584781#comment-14584781
]
Chris Nauroth commented on ZOOKEEPER-2210:
------------------------------------------
Hi [~michim]. Thank you for the patch. I built locally on a Mac and tested
{{cli_mt}} manually. It looks good overall. I have a few comments on edge
case error handling.
# It looks like {{host_get_clock_service}} can return an error code. If there
is an error returned, then it might not be valid to use the {{cclock}} in the
next call to {{clock_get_time}}.
# Similarly, if there is an error, then I don't know if it's still OK to call
{{mach_port_deallocate}}.
> clock_gettime is not available in os x
> --------------------------------------
>
> Key: ZOOKEEPER-2210
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2210
> Project: ZooKeeper
> Issue Type: Bug
> Components: c client
> Reporter: Michi Mutsuzaki
> Assignee: Michi Mutsuzaki
> Fix For: 3.5.1, 3.6.0
>
> Attachments: ZOOKEEPER-2210.patch
>
>
> {noformat}
> src/zookeeper.c:286:9: warning: implicit declaration of function
> 'clock_gettime' is invalid in C99 [-Wimplicit-function-declaration]
> ret = clock_gettime(CLOCK_MONOTONIC, &ts);
> ^
> src/zookeeper.c:286:23: error: use of undeclared identifier 'CLOCK_MONOTONIC'
> ret = clock_gettime(CLOCK_MONOTONIC, &ts);
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)