diff options
author | Daniel Stenberg <daniel@haxx.se> | 2017-05-31 23:22:46 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2017-05-31 23:22:46 +0200 |
commit | c5de7f50f73919ead96aa1b541090cb25d63b012 (patch) | |
tree | c0aee754d1ccc98eb7853b83270769f88664b5d8 /docs | |
parent | 45cecfbd33b121c864cbb7b83ea63f749e99f424 (diff) |
examples/externalsocket.c: s/closesocket/closecb
... since closesocket is a function in WinSock.
Reported-by: Marcel Raad
Bug: https://github.com/curl/curl/commit/55fcb8485914700132fd1854c9509b66c955efbe#co
mmitcomment-22347818
Diffstat (limited to 'docs')
-rw-r--r-- | docs/examples/externalsocket.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/examples/externalsocket.c b/docs/examples/externalsocket.c index 9adb0dc4f..0ac113db3 100644 --- a/docs/examples/externalsocket.c +++ b/docs/examples/externalsocket.c @@ -58,7 +58,7 @@ static size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream) return written; } -static int closesocket(void *clientp, curl_socket_t item) +static int closecb(void *clientp, curl_socket_t item) { (void)clientp; printf("libcurl wants to close %d now\n", (int)item); @@ -145,7 +145,7 @@ int main(void) curl_easy_setopt(curl, CURLOPT_OPENSOCKETDATA, &sockfd); /* call this function to close sockets */ - curl_easy_setopt(curl, CURLOPT_CLOSESOCKETFUNCTION, closesocket); + curl_easy_setopt(curl, CURLOPT_CLOSESOCKETFUNCTION, closecb); curl_easy_setopt(curl, CURLOPT_CLOSESOCKETDATA, &sockfd); /* call this function to set options for the socket */ |