aboutsummaryrefslogtreecommitdiff
path: root/package/lua-curl/0001-add-variant-definition-of-lcurl_url_t.patch
blob: 0fdd0760d6e920427889a60bb0d9becae37e9328 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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