diff --git a/package/apr/Config.in b/package/apr/Config.in
index 4606fc5378..9427b7af2c 100644
--- a/package/apr/Config.in
+++ b/package/apr/Config.in
@@ -3,6 +3,7 @@ config BR2_PACKAGE_APR
 	# apr really needs shared library support
 	depends on !BR2_STATIC_LIBS
 	depends on BR2_USE_MMU # fork() in apr_proc_fork()
+	select BR2_PACKAGE_LIBXCRYPT if BR2_TOOLCHAIN_USES_GLIBC
 	help
 	  The mission of the Apache Portable Runtime (APR) project is to
 	  create and maintain software libraries that provide a
diff --git a/package/apr/apr.mk b/package/apr/apr.mk
index bdc5e915c6..cb8c12dd65 100644
--- a/package/apr/apr.mk
+++ b/package/apr/apr.mk
@@ -68,6 +68,10 @@ else
 APR_CONF_OPTS += --disable-nonportable-atomics
 endif
 
+ifeq ($(BR2_PACKAGE_LIBXCRYPT),y)
+APR_DEPENDENCIES += libxcrypt
+endif
+
 ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y)
 APR_DEPENDENCIES += util-linux
 endif