diff --git a/util/linux/socket.cc b/util/linux/socket.cc index f2ad9bd0..868cee4a 100644 --- a/util/linux/socket.cc +++ b/util/linux/socket.cc @@ -23,6 +23,8 @@ namespace crashpad { +constexpr size_t UnixCredentialSocket::kMaxSendRecvMsgFDs; + // static bool UnixCredentialSocket::CreateCredentialSocketpair(ScopedFileHandle* sock1, ScopedFileHandle* sock2) { @@ -49,8 +51,6 @@ bool UnixCredentialSocket::CreateCredentialSocketpair(ScopedFileHandle* sock1, return true; } -constexpr size_t UnixCredentialSocket::kMaxSendRecvMsgFDs = 4; - // static int UnixCredentialSocket::SendMsg(int fd, const void* buf, diff --git a/util/linux/socket.h b/util/linux/socket.h index 85860f7b..d762592b 100644 --- a/util/linux/socket.h +++ b/util/linux/socket.h @@ -40,7 +40,7 @@ class UnixCredentialSocket { //! \brief The maximum number of file descriptors that may be sent/received //! with `SendMsg()` or `RecvMsg()`. - static const size_t kMaxSendRecvMsgFDs; + static constexpr size_t kMaxSendRecvMsgFDs = 4; //! \brief Wraps `sendmsg()` to send a message with file descriptors. //!