From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53587) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WmOT8-0005O7-QD for qemu-devel@nongnu.org; Mon, 19 May 2014 10:23:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WmOSz-0004BZ-VG for qemu-devel@nongnu.org; Mon, 19 May 2014 10:23:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:7609) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WmOSz-0004BS-NA for qemu-devel@nongnu.org; Mon, 19 May 2014 10:23:01 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s4JEN1CC024812 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 19 May 2014 10:23:01 -0400 From: Kevin Wolf Date: Mon, 19 May 2014 16:22:29 +0200 Message-Id: <1400509360-25470-12-git-send-email-kwolf@redhat.com> In-Reply-To: <1400509360-25470-1-git-send-email-kwolf@redhat.com> References: <1400509360-25470-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PULL 11/22] 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 From: Matthew Booth Signed-off-by: Matthew Booth Signed-off-by: Kevin Wolf --- 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.8.3.1