File: 0005-Fix-curl-option-types.patch

package info (click to toggle)
mcds 1.9-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 556 kB
  • sloc: ansic: 1,628; perl: 217; makefile: 65; sh: 57; sed: 16
file content (41 lines) | stat: -rw-r--r-- 1,366 bytes parent folder | download
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
From: Andrew Bower <andrew@bower.uk>
Last-Update: 2025-12-10
Bug-Ubuntu: https://bugs.launchpad.net/bugs/2134565
Forwarded: https://github.com/t-brown/mcds/pull/43
Subject: Pass boolean options to libcurl as long type

---
 src/curl.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/curl.c b/src/curl.c
index e95789e..4ff425c 100644
--- a/src/curl.c
+++ b/src/curl.c
@@ -66,7 +66,7 @@ cinit(CURL **hdl)
 		warnx(_("Unable to initialize curl handle."));
 		return(EXIT_FAILURE);
 	}
-	if (curl_easy_setopt(*hdl, CURLOPT_VERBOSE, options.verbose)) {
+	if (curl_easy_setopt(*hdl, CURLOPT_VERBOSE, (long) options.verbose)) {
 		warnx(_("Unable to set curls verbose option."));
 		return(EXIT_FAILURE);
 	}
@@ -74,7 +74,7 @@ cinit(CURL **hdl)
 		warnx(_("Unable to set curls URL."));
 		return(EXIT_FAILURE);
 	}
-	if (curl_easy_setopt(*hdl, CURLOPT_SSL_VERIFYPEER, options.verify)) {
+	if (curl_easy_setopt(*hdl, CURLOPT_SSL_VERIFYPEER, (long) options.verify)) {
 		warnx(_("Unable to set curls SSL verification."));
 		return(EXIT_FAILURE);
 	}
@@ -88,7 +88,7 @@ cinit(CURL **hdl)
 			return(EXIT_FAILURE);
 		}
 	} else {
-		if (curl_easy_setopt(*hdl, CURLOPT_NETRC, options.netrc)) {
+		if (curl_easy_setopt(*hdl, CURLOPT_NETRC, (long) options.netrc)) {
 			warnx(_("Unable to set curls .netrc option."));
 			return(EXIT_FAILURE);
 		}