From 2f40d531c47e10a5998de80b1f52bb55de8d2ab4 Mon Sep 17 00:00:00 2001 From: Luca Pizzamiglio Date: Tue, 28 May 2019 09:12:02 +0000 Subject: devel/electron4: Add electron 4.2.2 Finally, after a long wait, an electron port for FreeBSD lands in the portstree. A huge thanks to everyone contributed to this huge effort and to the maintainer that is willing to take the burden of the maintainership! --- .../files/patch-base_posix_unix__domain__socket.cc | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 devel/electron4/files/patch-base_posix_unix__domain__socket.cc (limited to 'devel/electron4/files/patch-base_posix_unix__domain__socket.cc') diff --git a/devel/electron4/files/patch-base_posix_unix__domain__socket.cc b/devel/electron4/files/patch-base_posix_unix__domain__socket.cc new file mode 100644 index 000000000000..68b77e9b98a7 --- /dev/null +++ b/devel/electron4/files/patch-base_posix_unix__domain__socket.cc @@ -0,0 +1,49 @@ +--- base/posix/unix_domain_socket.cc.orig 2019-03-15 06:25:27 UTC ++++ base/posix/unix_domain_socket.cc +@@ -5,7 +5,10 @@ + #include "base/posix/unix_domain_socket.h" + + #include ++#include + #include ++#include ++#include + #if !defined(OS_NACL_NONSFI) + #include + #endif +@@ -28,6 +31,14 @@ namespace base { + + const size_t UnixDomainSocket::kMaxFileDescriptors = 16; + ++#ifndef SCM_CREDENTIALS ++# define SCM_CREDENTIALS 0x9001 ++#endif ++ ++#ifndef SO_PASSCRED ++# define SO_PASSCRED 0x9002 ++#endif ++ + #if !defined(OS_NACL_NONSFI) + bool CreateSocketPair(ScopedFD* one, ScopedFD* two) { + int raw_socks[2]; +@@ -150,7 +161,7 @@ ssize_t UnixDomainSocket::RecvMsgWithFlags(int fd, + #if !defined(OS_NACL_NONSFI) && !defined(OS_MACOSX) + // The PNaCl toolchain for Non-SFI binary build and macOS do not support + // ucred. macOS supports xucred, but this structure is insufficient. +- + CMSG_SPACE(sizeof(struct ucred)) ++ + CMSG_SPACE(sizeof(struct cmsgcred)) + #endif // OS_NACL_NONSFI or OS_MACOSX + ; + char control_buffer[kControlBufferSize]; +@@ -180,9 +191,9 @@ ssize_t UnixDomainSocket::RecvMsgWithFlags(int fd, + // SCM_CREDENTIALS. + if (cmsg->cmsg_level == SOL_SOCKET && + cmsg->cmsg_type == SCM_CREDENTIALS) { +- DCHECK_EQ(payload_len, sizeof(struct ucred)); ++ DCHECK_EQ(payload_len, sizeof(struct cmsgcred)); + DCHECK_EQ(pid, -1); +- pid = reinterpret_cast(CMSG_DATA(cmsg))->pid; ++ pid = getpid(); + } + #endif // !defined(OS_NACL_NONSFI) && !defined(OS_MACOSX) + } -- cgit v1.2.3