Fix the following libcurl build failure raised since bump to version
1.1.1 in commit 01518e5660
:
In file included from /home/autobuild/autobuild/instance-11/output-1/host/sparc64-buildroot-linux-gnu/sysroot/usr/include/curl/curl.h:3195,
from turnrest.c:21:
turnrest.c: In function 'janus_turnrest_request':
turnrest.c:168:2: error: void value not ignored as it ought to be
168 | curl_easy_setopt(curl, api_http_get ? CURLOPT_HTTPGET : CURLOPT_POST, 1);
| ^
Fixes:
- http://autobuild.buildroot.org/results/11bb0079f5a7d06d3494a61b411f0af2e8c4d342
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
28 lines
1.2 KiB
Diff
28 lines
1.2 KiB
Diff
From 51431c36cd5f2997c0f7723909195b9883ae0486 Mon Sep 17 00:00:00 2001
|
|
From: Benson Muite <bkmgit@users.noreply.github.com>
|
|
Date: Wed, 4 Jan 2023 13:33:36 +0300
|
|
Subject: [PATCH] Use parentheses to ensure compilation (#3138)
|
|
|
|
Compiler fails with latest Curl release. Use parenthesis to ensure compiler evaluates expression correctly.
|
|
|
|
[Retrieved from:
|
|
https://github.com/meetecho/janus-gateway/commit/51431c36cd5f2997c0f7723909195b9883ae0486]
|
|
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
---
|
|
src/turnrest.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/turnrest.c b/src/turnrest.c
|
|
index b8560d22f2..42e6114de8 100644
|
|
--- a/src/turnrest.c
|
|
+++ b/src/turnrest.c
|
|
@@ -165,7 +165,7 @@ janus_turnrest_response *janus_turnrest_request(const char *user) {
|
|
JANUS_LOG(LOG_VERB, "Sending request: %s\n", request_uri);
|
|
janus_mutex_unlock(&api_mutex);
|
|
curl_easy_setopt(curl, CURLOPT_URL, request_uri);
|
|
- curl_easy_setopt(curl, api_http_get ? CURLOPT_HTTPGET : CURLOPT_POST, 1);
|
|
+ curl_easy_setopt(curl, (api_http_get ? CURLOPT_HTTPGET : CURLOPT_POST), 1);
|
|
if(!api_http_get) {
|
|
/* FIXME Some servers don't like a POST with no data */
|
|
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, query_string);
|