-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Ngtcp2 fix sendmsg build issue #8981
Conversation
3362026
to
9bbaa28
Compare
@@ -944,7 +944,7 @@ CURLcode Curl_quic_connect(struct Curl_easy *data, | |||
|
|||
ngtcp2_connection_close_error_default(&qs->last_error); | |||
|
|||
#if defined(__linux__) && defined(UDP_SEGMENT) | |||
#if defined(__linux__) && defined(UDP_SEGMENT) & defined(HAVE_SENDMSG) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this really be only one ampersand?
struct iovec msg_iov = {(void *)pkt, pktlen}; | ||
struct msghdr msg = {0}; | ||
uint8_t msg_ctrl[CMSG_SPACE(sizeof(uint16_t))] = {0}; | ||
uint8_t msg_ctrl[32]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the 32
a random choice and if not, would you mind making it a constant?
|
||
*psent = 0; | ||
|
||
while((sent = send(sockfd, (const char *)pkt, pktlen, 0)) == -1 && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the cast necessary? Usually passing any pointer to a void *
works just fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sadly it's necessary, because on Windows, it is a const char *
.
See also: #8978 (comment)
Ref: curl#8981 (comment) Ref: 927ede7 Reported-By: Emil Engler Closes #xxxx
Ref: 927ede7 Bug: #8981 (comment) Reported-by: Emil Engler Closes #8987
Fixes #8978