qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Booth <mbooth@redhat.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com
Subject: [Qemu-devel] [PATCH 1/4] curl: Fix build when curl_multi_socket_action isn't available
Date: Wed, 14 May 2014 19:28:40 -0400	[thread overview]
Message-ID: <1400110123-2692-1-git-send-email-mbooth@redhat.com> (raw)

Signed-off-by: Matthew Booth <mbooth@redhat.com>
---
 block/curl.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

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 | \
-- 
1.9.0

             reply	other threads:[~2014-05-14 23:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-14 23:28 Matthew Booth [this message]
2014-05-14 23:28 ` [Qemu-devel] [PATCH 2/4] curl: Remove broken parsing of options from url Matthew Booth
2014-05-14 23:28 ` [Qemu-devel] [PATCH 3/4] curl: Add sslverify option Matthew Booth
2014-05-15 11:33   ` Kevin Wolf
2014-05-14 23:28 ` [Qemu-devel] [PATCH 4/4] curl: Add usage documentation Matthew Booth
2014-05-15 11:35 ` [Qemu-devel] [PATCH 1/4] curl: Fix build when curl_multi_socket_action isn't available Kevin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1400110123-2692-1-git-send-email-mbooth@redhat.com \
    --to=mbooth@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).