summaryrefslogtreecommitdiff
path: root/include/mysql/psi/mysql_socket.h
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-07-03 10:22:43 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2018-07-03 10:22:43 +0300
commitc3289d27eef39a47fed2ce1ff239013ed6870f39 (patch)
tree2a6e2434287921eb6f5f7c7877e8da061803ed9e /include/mysql/psi/mysql_socket.h
parent358ae4b46dd52b329154cff901b58e96fd223773 (diff)
parenteaab98f7022732b26b4ea590e1bb44308e253be8 (diff)
downloadmariadb-git-c3289d27eef39a47fed2ce1ff239013ed6870f39.tar.gz
Merge mariadb-10.3.8 into 10.3
Diffstat (limited to 'include/mysql/psi/mysql_socket.h')
-rw-r--r--include/mysql/psi/mysql_socket.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/mysql/psi/mysql_socket.h b/include/mysql/psi/mysql_socket.h
index 3baabb6e57d..b8854edbfd0 100644
--- a/include/mysql/psi/mysql_socket.h
+++ b/include/mysql/psi/mysql_socket.h
@@ -561,6 +561,12 @@ inline_mysql_socket_socket
(key, (const my_socket*)&mysql_socket.fd, NULL, 0);
}
#endif
+
+ /* SOCK_CLOEXEC isn't always a number - can't preprocessor compare */
+#if defined(HAVE_FCNTL) && defined(FD_CLOEXEC) && !defined(HAVE_SOCK_CLOEXEC)
+ (void) fcntl(mysql_socket.fd, F_SETFD, FD_CLOEXEC);
+#endif
+
return mysql_socket;
}