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.
  • Loading branch information
monnerat committed Jul 30, 2023
1 parent f48ca56 commit d245aae
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 d245aae

Please sign in to comment.