cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-curl-Fix-build-when-curl_multi_socket_action-isn-t-a.patch

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