9ae3a8
From e1ae27052f1c226e2cabe2199ab98d7e243c8cd2 Mon Sep 17 00:00:00 2001
9ae3a8
From: Richard Jones <rjones@redhat.com>
9ae3a8
Date: Thu, 11 Jun 2015 11:40:19 +0200
9ae3a8
Subject: [PATCH 19/30] curl: Fix build when curl_multi_socket_action isn't
9ae3a8
 available
9ae3a8
9ae3a8
Message-id: <1434022828-13037-13-git-send-email-rjones@redhat.com>
9ae3a8
Patchwork-id: 65846
9ae3a8
O-Subject: [RHEL-7.2 qemu-kvm v3 PATCH 12/21] curl: Fix build when curl_multi_socket_action isn't available
9ae3a8
Bugzilla: 1226684
9ae3a8
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
9ae3a8
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
9ae3a8
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
9ae3a8
9ae3a8
From: Matthew Booth <mbooth@redhat.com>
9ae3a8
9ae3a8
Signed-off-by: Matthew Booth <mbooth@redhat.com>
9ae3a8
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
9ae3a8
9ae3a8
Upstream-status: 9aedd5a5d607216e41bfa6a2c1f7f5d2b17041c3
9ae3a8
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
9ae3a8
---
9ae3a8
 block/curl.c | 15 +++++++++++++++
9ae3a8
 1 file changed, 15 insertions(+)
9ae3a8
9ae3a8
diff --git a/block/curl.c b/block/curl.c
9ae3a8
index 1bff71a..be2d3f4 100644
9ae3a8
--- a/block/curl.c
9ae3a8
+++ b/block/curl.c
9ae3a8
@@ -37,6 +37,21 @@
9ae3a8
 #if LIBCURL_VERSION_NUM >= 0x071000
9ae3a8
 /* The multi interface timer callback was introduced in 7.16.0 */
9ae3a8
 #define NEED_CURL_TIMER_CALLBACK
9ae3a8
+#define HAVE_SOCKET_ACTION
9ae3a8
+#endif
9ae3a8
+
9ae3a8
+#ifndef HAVE_SOCKET_ACTION
9ae3a8
+/* If curl_multi_socket_action isn't available, define it statically here in
9ae3a8
+ * terms of curl_multi_socket. Note that ev_bitmask will be ignored, which is
9ae3a8
+ * less efficient but still safe. */
9ae3a8
+static CURLMcode __curl_multi_socket_action(CURLM *multi_handle,
9ae3a8
+                                            curl_socket_t sockfd,
9ae3a8
+                                            int ev_bitmask,
9ae3a8
+                                            int *running_handles)
9ae3a8
+{
9ae3a8
+    return curl_multi_socket(multi_handle, sockfd, running_handles);
9ae3a8
+}
9ae3a8
+#define curl_multi_socket_action __curl_multi_socket_action
9ae3a8
 #endif
9ae3a8
 
9ae3a8
 #define PROTOCOLS (CURLPROTO_HTTP | CURLPROTO_HTTPS | \
9ae3a8
-- 
9ae3a8
1.8.3.1
9ae3a8