I am a newbie in ZooKeeper. My code is quite simple as shown below. However, I got the error dereferencing pointer to incomplete type when I want to get the file descriptor of zookeeper handle.
#include <stdio.h>
#include "zookeeper.h"
static zhandle_t *zh;
typedef struct String_vector zoo_string;
void my_watcher_func(zhandle_t *zzh, int type, int state, const char *path, void watcherCtx()) {}
int main(int argc, char *argv[]) {
    int i, retval;
    char *host_port = "localhost:2191";
    char *zoo_root = "/";
    zoo_string *children_list = (zoo_string *)malloc(sizeof(zoo_string));
    zh = zookeeper_init(host_port, my_watcher_func, 2000, 0, NULL, 0);
    if (zh == NULL) {
        fprintf(stderr, "Error connecting to zookeeper server!\n");
        exit(EXIT_FAILURE);
    }
    retval = zoo_get_children(zh, zoo_root, 0, children_list);
    if (retval != ZOK) {
        fprintf(stderr, "Error retrieving znode from path %s!\n", zoo_root);
        exit(EXIT_FAILURE);
    }
    fprintf(stderr, "\n=== znode string === [ %s ]\n", zoo_root);
    for (i = 0; i < children_list->count; ++i) {
        fprintf(stderr, "\n(%d): %s\n", i + 1, children_list->data[i]);
    }
    fprintf(stderr, "\n=== done ===\n");
    fprintf(stderr, "%d\n", zh->fd); //error
    zookeeper_close(zh);
    return 0;
}
 
    