Browse Source

package/shadow: add libxcrypt optional dependency

Fix the following build failure raised since bump of glibc to version
2.39 in commit b5680f53d60acf8ff6010082f873438a39bd5d97:

configure: error: crypt() not found

Fixes: b5680f53d60acf8ff6010082f873438a39bd5d97
 - http://autobuild.buildroot.org/results/cd97aa4ee49c3052b762deccb5aa28cd23c54f5f

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Fabrice Fontaine 1 year ago
parent
commit
166b05b545
2 changed files with 5 additions and 0 deletions
  1. 1 0
      package/shadow/Config.in
  2. 4 0
      package/shadow/shadow.mk

+ 1 - 0
package/shadow/Config.in

@@ -3,6 +3,7 @@ menuconfig BR2_PACKAGE_SHADOW
 	depends on !BR2_STATIC_LIBS
 	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
 	depends on !BR2_TOOLCHAIN_USES_UCLIBC # reallocarray, explicit_bzero
+	select BR2_PACKAGE_LIBXCRYPT if BR2_TOOLCHAIN_USES_GLIBC
 	help
 	  Utilities to deal with user accounts.
 

+ 4 - 0
package/shadow/shadow.mk

@@ -88,6 +88,10 @@ else
 SHADOW_CONF_OPTS += --without-selinux
 endif
 
+ifeq ($(BR2_PACKAGE_LIBXCRYPT),y)
+SHADOW_DEPENDENCIES += libxcrypt
+endif
+
 # linux-pam is also used without account-tools-setuid enabled
 ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
 SHADOW_CONF_OPTS += --with-libpam