mirror of
https://git.freebsd.org/ports.git
synced 2025-05-14 16:21:50 -04:00
Build cross platform desktop apps with JavaScript, HTML, and CSS. It's easier than you think. If you can build a website, you can build a desktop app. Electron is a framework for creating native applications with web technologies like JavaScript, HTML, and CSS. It takes care of the hard parts so you can focus on the core of your application. WWW: https://electronjs.org/
39 lines
1.2 KiB
C++
39 lines
1.2 KiB
C++
--- net/socket/udp_socket_posix.cc.orig 2023-11-29 21:40:07 UTC
|
|
+++ net/socket/udp_socket_posix.cc
|
|
@@ -612,12 +612,17 @@ int UDPSocketPosix::SetRecvEcn() {
|
|
}
|
|
}
|
|
|
|
+#ifdef IP_RECVTOS
|
|
int rv = setsockopt(socket_, IPPROTO_IP, IP_RECVTOS, &ecn, sizeof(ecn));
|
|
+#else
|
|
+ int rv = -1;
|
|
+ errno = EOPNOTSUPP;
|
|
+#endif
|
|
return rv == 0 ? OK : MapSystemError(errno);
|
|
}
|
|
|
|
void UDPSocketPosix::SetMsgConfirm(bool confirm) {
|
|
-#if !BUILDFLAG(IS_APPLE)
|
|
+#if !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD)
|
|
if (confirm) {
|
|
sendto_flags_ |= MSG_CONFIRM;
|
|
} else {
|
|
@@ -638,7 +643,7 @@ int UDPSocketPosix::SetBroadcast(bool broadcast) {
|
|
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
|
|
int value = broadcast ? 1 : 0;
|
|
int rv;
|
|
-#if BUILDFLAG(IS_APPLE)
|
|
+#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD)
|
|
// SO_REUSEPORT on OSX permits multiple processes to each receive
|
|
// UDP multicast or broadcast datagrams destined for the bound
|
|
// port.
|
|
@@ -951,7 +956,7 @@ int UDPSocketPosix::DoBind(const IPEndPoint& address)
|
|
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
|
if (last_error == EINVAL)
|
|
return ERR_ADDRESS_IN_USE;
|
|
-#elif BUILDFLAG(IS_APPLE)
|
|
+#elif BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD)
|
|
if (last_error == EADDRNOTAVAIL)
|
|
return ERR_ADDRESS_IN_USE;
|
|
#endif
|