bpo-32635: Fix a segfault when importing the crypt module with libxcrypt. (#5284)

glibc is deprecating libcrypt in favor of libxcrypt, however python assumes
that crypt.h will always be included. This change makes the header inclusion
explicit when libxcrypt is present on the system.
This commit is contained in:
stratakis 2018-01-23 16:11:24 +01:00 committed by Victor Stinner
parent 370d04d1dc
commit e768c86ef4
5 changed files with 10 additions and 2 deletions

View file

@ -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