Skip to content

Commit

Permalink
tests: fix compilation error for os400
Browse files Browse the repository at this point in the history
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 curl#11547
  • Loading branch information
monnerat authored and ptitSeb committed Sep 25, 2023
1 parent 0616d4a commit 497c8aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/libtest/lib1522.c
Expand Up @@ -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;
Expand Down

0 comments on commit 497c8aa

Please sign in to comment.