danielsuo / libdocker

An SDK for the Docker Engine API in C
MIT License
59 stars 24 forks source link

this sdk need libcurl version new than 7.40.0 #6

Closed duguhaotian closed 7 years ago

duguhaotian commented 7 years ago

src/docker.c use "CURLOPT_UNIX_SOCKET_PATH", but this define in libcurl7.40.0.

void init_curl(DOCKER *client) {
  curl_easy_setopt(client->curl, CURLOPT_UNIX_SOCKET_PATH, "/var/run/docker.sock");
  curl_easy_setopt(client->curl, CURLOPT_WRITEFUNCTION, write_function);
  curl_easy_setopt(client->curl, CURLOPT_WRITEDATA, client->buffer);
}

more information can watch libcurl site https://curl.haxx.se/libcurl/c/CURLOPT_UNIX_SOCKET_PATH.html

danielsuo commented 7 years ago

Let me know if there's something to fix. Are you suggesting we update the README? Closing for now. Feel free to re-open.