Skip to content

Commit

Permalink
configure.ac: fix build with libxcrypt and uclibc-ng
Browse files Browse the repository at this point in the history
Fix the following build failure with libxcrypt and uclibc-ng:

ld: unix_chkpwd-passverify.o: in function `verify_pwd_hash':
passverify.c:(.text+0xab4): undefined reference to `crypt_checksalt'

Fixes:
 - http://autobuild.buildroot.org/results/65d68b7c9c7de1c7cb0f941ff9982f93a49a56f8

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  • Loading branch information
ffontaine committed Jun 15, 2021
1 parent b4f0e2e commit fe13075
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -362,10 +362,18 @@ AC_SUBST(LIBAUDIT)
AC_CHECK_HEADERS(crypt.h)

BACKUP_LIBS=$LIBS
AC_SEARCH_LIBS([crypt],[crypt])
case "$ac_cv_search_crypt" in
-l*) LIBCRYPT="$ac_cv_search_crypt" ;;
*) LIBCRYPT="" ;;
LIBCRYPT=""
AC_SEARCH_LIBS([crypt_gensalt_rn],[crypt])
case "$ac_cv_search_crypt_gensalt_rn" in
-l*) LIBCRYPT="$ac_cv_search_crypt_gensalt_rn" ;;
no) AC_SEARCH_LIBS([crypt_r],[crypt])
case "$ac_cv_search_crypt_r" in
-l*) LIBCRYPT="$ac_cv_search_crypt_r" ;;
no ) AC_SEARCH_LIBS([crypt],[crypt])
case "$ac_cv_search_crypt" in
-l*) LIBCRYPT="$ac_cv_search_crypt" ;;
esac ;;
esac ;;
esac
AC_CHECK_FUNCS([crypt_r])
LIBS=$BACKUP_LIBS
Expand Down

0 comments on commit fe13075

Please sign in to comment.