Skip to content

Commit 519561d

Browse files
besser82stratakis
authored andcommitted
00290: Include crypt.h for declaration of crypt
Not every target system may provide a crypt() function in its stdlibc and may use an external or replacement library, like libxcrypt, for providing such functions. Fixed upstream: https://bugs.python.org/issue32635 Co-authored-by: Charalampos Stratakis <[email protected]>
1 parent dbc93c4 commit 519561d

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

Include/Python.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@
3535
#ifdef HAVE_UNISTD_H
3636
#include <unistd.h>
3737
#endif
38+
#ifdef HAVE_CRYPT_H
39+
#include <crypt.h>
40+
#endif
3841

3942
/* For size_t? */
4043
#ifdef HAVE_STDDEF_H

configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7709,7 +7709,7 @@ $as_echo "#define STDC_HEADERS 1" >>confdefs.h
77097709

77107710
fi
77117711

7712-
for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
7712+
for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
77137713
fcntl.h grp.h \
77147714
ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
77157715
sched.h shadow.h signal.h stdint.h stropts.h termios.h \

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1949,7 +1949,7 @@ dnl AC_MSG_RESULT($cpp_type)
19491949

19501950
# checks for header files
19511951
AC_HEADER_STDC
1952-
AC_CHECK_HEADERS(asm/types.h conio.h direct.h dlfcn.h errno.h \
1952+
AC_CHECK_HEADERS(asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
19531953
fcntl.h grp.h \
19541954
ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
19551955
sched.h shadow.h signal.h stdint.h stropts.h termios.h \

pyconfig.h.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@
137137
/* Define to 1 if you have the `copysign' function. */
138138
#undef HAVE_COPYSIGN
139139

140+
/* Define to 1 if you have the <crypt.h> header file. */
141+
#undef HAVE_CRYPT_H
142+
140143
/* Define to 1 if you have the `ctermid' function. */
141144
#undef HAVE_CTERMID
142145

0 commit comments

Comments
 (0)