summaryrefslogtreecommitdiff
path: root/filesystems/httpdirfs/files/patch-curl
blob: 6b888715536d174cc9269570792a81e53891d39d (plain) (blame)
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
41
42
43
44
45
46
47
48
49
50
51
--- src/link.c.orig	2024-11-01 20:22:40 UTC
+++ src/link.c
@@ -66,14 +66,14 @@ static CURL *Link_to_curl(Link *link)
     if (ret) {
         lprintf(error, "%s", curl_easy_strerror(ret));
     }
-    ret = curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
+    ret = curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
     if (ret) {
         lprintf(error, "%s", curl_easy_strerror(ret));
     }
     /*
      * for following directories without the '/'
      */
-    ret = curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 2);
+    ret = curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 2L);
     if (ret) {
         lprintf(error, "%s", curl_easy_strerror(ret));
     }
@@ -81,11 +81,11 @@ static CURL *Link_to_curl(Link *link)
     if (ret) {
         lprintf(error, "%s", curl_easy_strerror(ret));
     }
-    ret = curl_easy_setopt(curl, CURLOPT_TCP_KEEPALIVE, 1);
+    ret = curl_easy_setopt(curl, CURLOPT_TCP_KEEPALIVE, 1L);
     if (ret) {
         lprintf(error, "%s", curl_easy_strerror(ret));
     }
-    ret = curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 15);
+    ret = curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 15L);
     if (ret) {
         lprintf(error, "%s", curl_easy_strerror(ret));
     }
@@ -118,7 +118,7 @@ static CURL *Link_to_curl(Link *link)
         }
     }
     if (CONFIG.insecure_tls) {
-        ret = curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0);
+        ret = curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
         if (ret) {
             lprintf(error, "%s", curl_easy_strerror(ret));
         }
@@ -197,7 +197,7 @@ static void Link_req_file_stat(Link *this_link)
 {
     lprintf(debug, "%s\n", this_link->f_url);
     CURL *curl = Link_to_curl(this_link);
-    CURLcode ret = curl_easy_setopt(curl, CURLOPT_NOBODY, 1);
+    CURLcode ret = curl_easy_setopt(curl, CURLOPT_NOBODY, 1L);
     if (ret) {
         lprintf(error, "%s", curl_easy_strerror(ret));
     }