From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46381) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WiJuo-0007gI-Jn for qemu-devel@nongnu.org; Thu, 08 May 2014 04:43:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WiJuh-0003Fq-BQ for qemu-devel@nongnu.org; Thu, 08 May 2014 04:42:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:64696) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WiJuh-0003FK-3Z for qemu-devel@nongnu.org; Thu, 08 May 2014 04:42:47 -0400 From: Matthew Booth Date: Thu, 8 May 2014 09:42:20 +0100 Message-Id: <1399538540-5076-5-git-send-email-mbooth@redhat.com> In-Reply-To: <1399538540-5076-1-git-send-email-mbooth@redhat.com> References: <1399538540-5076-1-git-send-email-mbooth@redhat.com> Subject: [Qemu-devel] [PATCH 4/4] curl: Fix build when curl_multi_socket_action isn't available List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, peter.maydell@linaro.org Signed-off-by: Matthew Booth --- block/curl.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/block/curl.c b/block/curl.c index 8cf0a3e..e5581f5 100644 --- a/block/curl.c +++ b/block/curl.c @@ -38,6 +38,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