diff mbox

[1/4] curl: Fix build when curl_multi_socket_action isn't available

Message ID 1400110123-2692-1-git-send-email-mbooth@redhat.com
State New
Headers show

Commit Message

Matthew Booth May 14, 2014, 11:28 p.m. UTC
Signed-off-by: Matthew Booth <mbooth@redhat.com>
---
 block/curl.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

Comments

Kevin Wolf May 15, 2014, 11:35 a.m. UTC | #1
Am 15.05.2014 um 01:28 hat Matthew Booth geschrieben:
> Signed-off-by: Matthew Booth <mbooth@redhat.com>
> ---
>  block/curl.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)

Thanks, applied all to the block branch (with patch 3 fixed as commented
there).

Please don't forget --cover-letter and --subject-prefix="PATCH v2" next
time, that makes it easier to reply to the whole series and to keep
track of the current version.

Kevin
diff mbox

Patch

diff --git a/block/curl.c b/block/curl.c
index d2f1084..f3c797a 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 | \