blob: 11d5df3a8a82f449d25259b4d2b03bc5dc283108 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
--- net/socket/udp_socket_posix.cc.orig 2023-06-05 19:39:05 UTC
+++ net/socket/udp_socket_posix.cc
@@ -575,7 +575,7 @@ int UDPSocketPosix::SetDoNotFragment() {
}
void UDPSocketPosix::SetMsgConfirm(bool confirm) {
-#if !BUILDFLAG(IS_APPLE)
+#if !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD)
if (confirm) {
sendto_flags_ |= MSG_CONFIRM;
} else {
@@ -596,7 +596,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.
@@ -909,7 +909,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
|