summaryrefslogtreecommitdiff
path: root/include/mysql/psi/mysql_socket.h
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-06-21 23:47:39 +0200
committerSergei Golubchik <serg@mariadb.org>2018-06-21 23:47:39 +0200
commitb942aa34c10ddfa3fe4977ae60afed5cbdc51083 (patch)
tree0a1a934ca7b728e3ffb81cd2f7c6a858524726d4 /include/mysql/psi/mysql_socket.h
parentfe3f9fa9183ea3d10397b6f7f4d422ae9bba00a4 (diff)
parentc09a8b5b36edb494e2bcc93074c06e26cd9f2b92 (diff)
downloadmariadb-git-b942aa34c10ddfa3fe4977ae60afed5cbdc51083.tar.gz
Merge branch '10.1' into 10.2
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 64531e5c35e..6bc14e984fd 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;
}