diff options
| author | Antoine Brodin <antoine@FreeBSD.org> | 2021-01-01 10:11:34 +0000 | 
|---|---|---|
| committer | Antoine Brodin <antoine@FreeBSD.org> | 2021-01-01 10:11:34 +0000 | 
| commit | 26b4c8f71f91d22e081b27814782686edde0c90a (patch) | |
| tree | 1c321c39372c25d8634e75b5c8e08edc676b296d /devel/electron6/files/patch-base_posix_unix__domain__socket.cc | |
| parent | New port: math/py-optuna: A hyperparameter optimization framework (diff) | |
Revert r559792 to unbreak INDEX and bulk -a
It seems a lot of reverse dependencies were missed
With hat:	portmgr
Diffstat (limited to 'devel/electron6/files/patch-base_posix_unix__domain__socket.cc')
| -rw-r--r-- | devel/electron6/files/patch-base_posix_unix__domain__socket.cc | 49 | 
1 files changed, 49 insertions, 0 deletions
| diff --git a/devel/electron6/files/patch-base_posix_unix__domain__socket.cc b/devel/electron6/files/patch-base_posix_unix__domain__socket.cc new file mode 100644 index 000000000000..a4691b9effe2 --- /dev/null +++ b/devel/electron6/files/patch-base_posix_unix__domain__socket.cc @@ -0,0 +1,49 @@ +--- base/posix/unix_domain_socket.cc.orig	2019-09-10 10:42:27 UTC ++++ base/posix/unix_domain_socket.cc +@@ -5,7 +5,10 @@ + #include "base/posix/unix_domain_socket.h" +  + #include <errno.h> ++#include <sys/param.h> + #include <sys/socket.h> ++#include <sys/types.h> ++#include <sys/ucred.h> + #if !defined(OS_NACL_NONSFI) + #include <sys/un.h> + #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<struct ucred*>(CMSG_DATA(cmsg))->pid; ++        pid = getpid(); +       } + #endif  // !defined(OS_NACL_NONSFI) && !defined(OS_MACOSX) +     } | 
