Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OS400 build break in tftp.c, 5th argument of Curl_os400_sendto() should be const #10539

jonrumsey opened this issue Feb 16, 2023 · 0 comments


Copy link

I did this

Build 7.88, failed in TFTP module with following const mismatch error at line 531;

CZM0280(30) Function argument assignment between types "struct sockaddr*" and "const struct sockaddr*" is not allowed.

    senddata = sendto(state->sockfd, (void *)state->,
                      (SEND_TYPE_ARG3)sbytes, 0,

This appears to have been uncovered by #10213.

The root cause is OS400 where in setup-os400.h, sendto() is hash defined to use Curl_os400_sendto(), however the prototype for the OS400 wrapper to deal with EBCDIC/ASCII conversions doesn't match the usual POSIX prototype of;

ssize_t sendto(int sockfd, const void *buf, size_t len, int flags,
               const struct sockaddr *dest_addr, socklen_t addrlen);

I expected the following

Clean build

curl/libcurl version


[curl -V output]

operating system

OS400 V7R5M0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

2 participants