Do not assume, that "crypt" function is provided by glibc; #1536881

--- mysql-5.7.21/include/my_global.h	2017-12-28 04:46:26.000000000 +0100
+++ mysql-5.7.21/include/my_global.h_patched	2018-01-22 01:01:42.450315852 +0100
@@ -49,6 +49,9 @@
 #include <time.h>
 #include <errno.h>				/* Recommended by debian */
 #include <sys/types.h>
+#if defined(HAVE_CRYPT_H)
+#include <crypt.h>
+#endif
 
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>


--- mysql-5.7.21/configure.cmake	2017-12-28 04:46:26.000000000 +0100
+++ mysql-5.7.21/configure.cmake_patched	2018-01-22 01:00:09.955057755 +0100
@@ -493,6 +493,7 @@ CHECK_INCLUDE_FILES (fnmatch.h HAVE_FNMA
 CHECK_INCLUDE_FILES (sys/un.h HAVE_SYS_UN_H)
 CHECK_INCLUDE_FILES (vis.h HAVE_VIS_H) # Used by libedit
 CHECK_INCLUDE_FILES (sasl/sasl.h HAVE_SASL_SASL_H) # Used by memcached
+CHECK_INCLUDE_FILES (crypt.h HAVE_CRYPT_H)
 
 # For libevent
 CHECK_INCLUDE_FILES(sys/devpoll.h HAVE_DEVPOLL)


--- mysql-5.7.21/config.h.cmake	2017-12-28 04:46:26.000000000 +0100
+++ mysql-5.7.21/config.h.cmake_patched	2018-01-22 01:51:02.522570765 +0100
@@ -62,6 +62,7 @@
 #cmakedefine HAVE_SYS_UN_H 1
 #cmakedefine HAVE_VIS_H 1
 #cmakedefine HAVE_SASL_SASL_H 1
+#cmakedefine HAVE_CRYPT_H 1
 
 /* Libevent */
 #cmakedefine HAVE_DEVPOLL 1
