From 36d656fe5734e06645693d7231ec5df2a3b7a9dd Mon Sep 17 00:00:00 2001 From: Patrick Monnerat Date: Sun, 30 Jul 2023 19:10:31 +0200 Subject: [PATCH] tests: fix compilation error for os400 OS400 uses BSD 4.3 setsockopt() prototype by default: this does not define parameter as const, resulting in an error if actual parameter is const. Remove the const keyword from the actual parameter cast: this works in all conditions, even if the formal parameter uses it. Closes #11547 --- tests/libtest/lib1522.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/libtest/lib1522.c b/tests/libtest/lib1522.c index 869959729e..1fbd7b92ce 100644 --- a/tests/libtest/lib1522.c +++ b/tests/libtest/lib1522.c @@ -40,7 +40,7 @@ static int sockopt_callback(void *clientp, curl_socket_t curlfd, (void) clientp; (void) purpose; setsockopt(curlfd, SOL_SOCKET, SO_SNDBUF, - (const char *)&sndbufsize, sizeof(sndbufsize)); + (char *)&sndbufsize, sizeof(sndbufsize)); #else (void)clientp; (void)curlfd;