aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Booth <mbooth@redhat.com>2014-05-14 19:28:40 -0400
committerKevin Wolf <kwolf@redhat.com>2014-05-19 11:36:49 +0200
commit9aedd5a5d607216e41bfa6a2c1f7f5d2b17041c3 (patch)
tree553cd985909ee77e07fc899d32a513531acb7041
parentb5e51dd7144719148c5df42b38b6086366f90d5e (diff)
curl: Fix build when curl_multi_socket_action isn't available
Signed-off-by: Matthew Booth <mbooth@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
-rw-r--r--block/curl.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/block/curl.c b/block/curl.c
index d2f1084b91..f3c797ad09 100644
--- a/block/curl.c
+++ b/block/curl.c
@@ -37,6 +37,21 @@
#if LIBCURL_VERSION_NUM >= 0x071000
/* The multi interface timer callback was introduced in 7.16.0 */
#define NEED_CURL_TIMER_CALLBACK
+#define HAVE_SOCKET_ACTION
+#endif
+
+#ifndef HAVE_SOCKET_ACTION
+/* If curl_multi_socket_action isn't available, define it statically here in
+ * terms of curl_multi_socket. Note that ev_bitmask will be ignored, which is
+ * less efficient but still safe. */
+static CURLMcode __curl_multi_socket_action(CURLM *multi_handle,
+ curl_socket_t sockfd,
+ int ev_bitmask,
+ int *running_handles)
+{
+ return curl_multi_socket(multi_handle, sockfd, running_handles);
+}
+#define curl_multi_socket_action __curl_multi_socket_action
#endif
#define PROTOCOLS (CURLPROTO_HTTP | CURLPROTO_HTTPS | \