kodi: fix building against curl 7.50.0 (#4497)

This commit is contained in:
Helmut Pozimski 2016-07-24 07:35:23 +02:00
parent 36e790cf96
commit aedb03d123
2 changed files with 49 additions and 2 deletions

View file

@ -0,0 +1,44 @@
diff --git a/xbmc/filesystem/CurlFile.h b/xbmc/filesystem/CurlFile.h
index b4f5046..81a5ae5 100644
--- a/xbmc/filesystem/CurlFile.h
+++ b/xbmc/filesystem/CurlFile.h
@@ -24,11 +24,17 @@
#include <map>
#include <string>
#include "utils/HttpHeader.h"
+#include <curl/curlver.h>
namespace XCURL
{
+#if LIBCURL_VERSION_NUM >= 0x073200
+ typedef struct Curl_easy CURL_HANDLE;
+ typedef struct Curl_multi CURLM;
+#else
typedef void CURL_HANDLE;
typedef void CURLM;
+#endif
struct curl_slist;
}
diff --git a/xbmc/filesystem/DllLibCurl.h b/xbmc/filesystem/DllLibCurl.h
index db97f92..9e78a91 100644
--- a/xbmc/filesystem/DllLibCurl.h
+++ b/xbmc/filesystem/DllLibCurl.h
@@ -52,7 +52,7 @@ namespace XCURL
virtual CURLMcode multi_fdset(CURLM *multi_handle, fd_set *read_fd_set, fd_set *write_fd_set, fd_set *exc_fd_set, int *max_fd)=0;
virtual CURLMcode multi_timeout(CURLM *multi_handle, long *timeout)=0;
virtual CURLMsg* multi_info_read(CURLM *multi_handle, int *msgs_in_queue)=0;
- virtual void multi_cleanup(CURL_HANDLE * handle )=0;
+ virtual CURLMcode multi_cleanup(CURLM * handle )=0;
virtual struct curl_slist* slist_append(struct curl_slist *, const char *)=0;
virtual void slist_free_all(struct curl_slist *)=0;
};
@@ -77,7 +77,7 @@ namespace XCURL
DEFINE_METHOD5(CURLMcode, multi_fdset, (CURLM *p1, fd_set *p2, fd_set *p3, fd_set *p4, int *p5))
DEFINE_METHOD2(CURLMcode, multi_timeout, (CURLM *p1, long *p2))
DEFINE_METHOD2(CURLMsg*, multi_info_read, (CURLM *p1, int *p2))
- DEFINE_METHOD1(void, multi_cleanup, (CURLM *p1))
+ DEFINE_METHOD1(CURLMcode, multi_cleanup, (CURLM *p1))
DEFINE_METHOD2(struct curl_slist*, slist_append, (struct curl_slist * p1, const char * p2))
DEFINE_METHOD1(void, slist_free_all, (struct curl_slist * p1))
DEFINE_METHOD1(const char *, easy_strerror, (CURLcode p1))

View file

@ -1,7 +1,7 @@
# Template file for 'kodi' # Template file for 'kodi'
pkgname=kodi pkgname=kodi
version=16.1 version=16.1
revision=4 revision=5
patch_args="-Np1" patch_args="-Np1"
_codename="Jarvis" _codename="Jarvis"
wrksrc="xbmc-${version}-${_codename}" wrksrc="xbmc-${version}-${_codename}"
@ -42,7 +42,10 @@ case "$XBPS_MACHINE" in
*) hostmakedepends+=" swig openjdk-jre";; *) hostmakedepends+=" swig openjdk-jre";;
esac esac
broken="https://build.voidlinux.eu/builders/x86_64-musl_builder/builds/12849/steps/shell_3/logs/stdio (broken with curl-7.50)" # The patch fix-curl-750-compatibility.patch patches the kodi code to build against curl >= 7.50.0
# since there were some forward declarations that conflicted after the changes in that curl release.
# The upstream pull request can be found at https://github.com/xbmc/xbmc/pull/10160
# Any updates to this package should bear the upstream PR in mind.
# XXX http://build.voidlinux.eu/builders/x86_64_builder/builds/10520/steps/shell_3/logs/stdio # XXX http://build.voidlinux.eu/builders/x86_64_builder/builds/10520/steps/shell_3/logs/stdio
CXXFLAGS="-fpermissive" CXXFLAGS="-fpermissive"