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

FreeBSD compatibility #600

Merged
merged 5 commits into from
Dec 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deps/picotls
Submodule picotls updated 1 files
+4 −1 lib/picotls.c
10 changes: 6 additions & 4 deletions src/cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -511,11 +511,13 @@ static void set_srcaddr(struct msghdr *mess, quicly_address_t *addr)
memcpy(CMSG_DATA(cmsg), &info, sizeof(info));
mess->msg_controllen += CMSG_SPACE(sizeof(info));
#elif defined(IP_SENDSRCADDR)
/* TODO FreeBSD: skip setting IP_SENDSRCADDR if the socket is not bound to INADDR_ANY, as doing so results in sendmsg
* generating an error */
cmsg->cmsg_level = IPPROTO_IP;
cmsg->cmsg_type = IP_SENDSRCADDR;
cmsg->cmsg_len = CMSG_LEN(sizeof(addr->sin));
memcpy(CMSG_DATA(cmsg), &addr->sin, sizeof(addr->sin));
mess->msg_controllen += CMSG_SPACE(sizeof(addr->sin));
cmsg->cmsg_len = CMSG_LEN(sizeof(addr->sin.sin_addr));
memcpy(CMSG_DATA(cmsg), &addr->sin.sin_addr, sizeof(addr->sin.sin_addr));
mess->msg_controllen += CMSG_SPACE(sizeof(addr->sin.sin_addr));
#else
assert(!"FIXME");
#endif
Expand All @@ -534,7 +536,7 @@ static void set_srcaddr(struct msghdr *mess, quicly_address_t *addr)
}
}

static void set_ecn(struct msghdr *mess, int ecn)
static void set_ecn(struct msghdr *mess, uint8_t ecn)
{
if (ecn == 0)
return;
Expand Down
2 changes: 1 addition & 1 deletion t/cplusplus.t
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/perl
#! /usr/bin/env perl

use strict;
use warnings;
Expand Down
Loading