aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Francois Perrad <fperrad@gmail.com>2019-02-24 20:51:32 +0100
committerGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2019-02-24 21:58:16 +0100
commitdd6e3c8f1acae4b366803039e9f266f58ca7461e (patch)
treec1ae38d78082acda75feab506d397a127f82c898
parent50610dccfaa7badd4a995693107280de07bfe742 (diff)
downloadbuildroot-dd6e3c8f1acae4b366803039e9f266f58ca7461e.tar.gz
buildroot-dd6e3c8f1acae4b366803039e9f266f58ca7461e.tar.bz2
package/lua-curl: add variant definition of lcurl_url_t
lua-curl has separate code paths for compilers that support forward typedef declarations and those who don't. For the latter case, one structure was not properly defined, causing a build failure with older compilers. Fixes: http://autobuild.buildroot.org/results/8d76ad49837b368a7bba3c3dfd445a035471268a/ Signed-off-by: Francois Perrad <francois.perrad@gadz.org> [Thomas: improve commit log] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
-rw-r--r--package/lua-curl/0001-add-variant-definition-of-lcurl_url_t.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/package/lua-curl/0001-add-variant-definition-of-lcurl_url_t.patch b/package/lua-curl/0001-add-variant-definition-of-lcurl_url_t.patch
new file mode 100644
index 0000000000..0fdd0760d6
--- /dev/null
+++ b/package/lua-curl/0001-add-variant-definition-of-lcurl_url_t.patch
@@ -0,0 +1,40 @@
+From 28ac0c5e642c9f7e3091a60268745f7cab4cc92b Mon Sep 17 00:00:00 2001
+From: Francois Perrad <francois.perrad@gadz.org>
+Date: Sat, 23 Feb 2019 15:23:26 +0100
+Subject: [PATCH] add variant definition of lcurl_url_t
+
+like in lceasy.h
+
+Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
+---
+ src/lcurlapi.h | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/Lua-cURLv3-0.3.9/src/lcurlapi.h b/Lua-cURLv3-0.3.9/src/lcurlapi.h
+index 4dd4672..862c94f 100644
+--- a/Lua-cURLv3-0.3.9/src/lcurlapi.h
++++ b/Lua-cURLv3-0.3.9/src/lcurlapi.h
+@@ -19,11 +19,20 @@
+
+ #if LCURL_CURL_VER_GE(7,62,0)
+
++#if LCURL_CC_SUPPORT_FORWARD_TYPEDEF
+ typedef struct lcurl_url_tag {
+ CURLU *url;
+
+ int err_mode;
+ }lcurl_url_t;
++#else
++struct lcurl_url_tag {
++ CURLU *url;
++
++ int err_mode;
++};
++#define lcurl_url_t struct lcurl_url_tag
++#endif
+
+ int lcurl_url_create(lua_State *L, int error_mode);
+
+--
+2.17.1
+