diff -U3 -r Python-3.4.8-orig/configure Python-3.4.8/configure
--- Python-3.4.8-orig/configure 2018-02-13 11:08:48.126741021 +0100
+++ Python-3.4.8/configure 2018-02-13 11:32:32.579790986 +0100
@@ -7006,7 +7006,7 @@
fi
-for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
+for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
fcntl.h grp.h \
ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
sched.h shadow.h signal.h stdint.h stropts.h termios.h \
diff -U3 -r Python-3.4.8-orig/configure.ac Python-3.4.8/configure.ac
--- Python-3.4.8-orig/configure.ac 2018-02-13 11:08:48.060740742 +0100
+++ Python-3.4.8/configure.ac 2018-02-13 11:09:59.208039082 +0100
@@ -1563,7 +1563,7 @@
# checks for header files
AC_HEADER_STDC
-AC_CHECK_HEADERS(asm/types.h conio.h direct.h dlfcn.h errno.h \
+AC_CHECK_HEADERS(asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
fcntl.h grp.h \
ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
sched.h shadow.h signal.h stdint.h stropts.h termios.h \
diff -U3 -r Python-3.4.8-orig/Include/Python.h Python-3.4.8/Include/Python.h
--- Python-3.4.8-orig/Include/Python.h 2018-02-05 00:40:38.000000000 +0100
+++ Python-3.4.8/Include/Python.h 2018-02-13 11:09:40.689963273 +0100
@@ -35,6 +35,9 @@
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
+#ifdef HAVE_CRYPT_H
+#include <crypt.h>
+#endif
/* For size_t? */
#ifdef HAVE_STDDEF_H
diff -U3 -r Python-3.4.8-orig/Modules/_cryptmodule.c Python-3.4.8/Modules/_cryptmodule.c
--- Python-3.4.8-orig/Modules/_cryptmodule.c 2018-02-05 00:40:38.000000000 +0100
+++ Python-3.4.8/Modules/_cryptmodule.c 2018-02-13 12:00:51.636164978 +0100
@@ -69,7 +69,8 @@
{
/* On some platforms (AtheOS) crypt returns NULL for an invalid
salt. Return None in that case. XXX Maybe raise an exception? */
- return Py_BuildValue("s", crypt(word, salt));
+ char *result = crypt(word, salt);
+ return Py_BuildValue("s", result);
}