You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by gr...@apache.org on 2020/04/21 18:47:33 UTC
[kudu] branch master updated: [mac] Fix compilation on macOS
This is an automated email from the ASF dual-hosted git repository.
granthenke pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git
The following commit(s) were added to refs/heads/master by this push:
new 3ff21bb [mac] Fix compilation on macOS
3ff21bb is described below
commit 3ff21bbd3bea76422d888866fbaa327f23188eae
Author: Grant Henke <gr...@apache.org>
AuthorDate: Tue Apr 21 12:07:59 2020 -0500
[mac] Fix compilation on macOS
Commit fbde2371 broke the build on macOS with the following error:
`error: use of undeclared identifier 'SO_DOMAIN’`
This patch fixes the build by disabling the use of `SO_DOMAIN`
to disable `TCP_CORK` in the case of an `AF_UNIX` socket on
macOS.
Change-Id: I815421a7531136c6a7c468b1664221cfc5ea5df1
Reviewed-on: http://gerrit.cloudera.org:8080/15771
Tested-by: Kudu Jenkins
Reviewed-by: Alexey Serbin <as...@cloudera.com>
---
src/kudu/security/tls_socket.cc | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/kudu/security/tls_socket.cc b/src/kudu/security/tls_socket.cc
index 8f84c3f..cd67b7a 100644
--- a/src/kudu/security/tls_socket.cc
+++ b/src/kudu/security/tls_socket.cc
@@ -45,6 +45,10 @@ TlsSocket::TlsSocket(int fd, c_unique_ptr<SSL> ssl)
: Socket(fd),
ssl_(std::move(ssl)) {
use_cork_ = true;
+
+#ifndef __APPLE__
+// `SO_DOMAIN` is not available on macOS. This code can be safely
+// skipped because SetTcpCork() is a no-op on macOS.
if (fd >= 0) {
int dom;
socklen_t len = sizeof(dom);
@@ -53,6 +57,7 @@ TlsSocket::TlsSocket(int fd, c_unique_ptr<SSL> ssl)
use_cork_ = false;
}
}
+#endif
}
TlsSocket::~TlsSocket() {