From e4eda364a2f80e3d1883f85e997a89f0f1dd6365 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Sun, 7 Apr 2024 16:19:20 +0200 Subject: [PATCH] package/thttpd: add libxcrypt optional dependency Fix the following build failure raised since bump of glibc to version 2.39 in commit b5680f53d60acf8ff6010082f873438a39bd5d97: /home/autobuild/autobuild/instance-14/output-1/host/lib/gcc/arm-buildroot-linux-gnueabi/12.3.0/../../../../arm-buildroot-linux-gnueabi/bin/ld: libhttpd.o: in function `auth_check2': libhttpd.c:(.text+0x3d50): undefined reference to `crypt' Fixes: b5680f53d60acf8ff6010082f873438a39bd5d97 - http://autobuild.buildroot.org/results/bfb8a115edf71b1852cc8585c00eb9f0e801a955 Signed-off-by: Fabrice Fontaine Signed-off-by: Yann E. MORIN --- package/thttpd/Config.in | 1 + package/thttpd/thttpd.mk | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/package/thttpd/Config.in b/package/thttpd/Config.in index 66537aa270..bd97bc7a75 100644 --- a/package/thttpd/Config.in +++ b/package/thttpd/Config.in @@ -1,6 +1,7 @@ config BR2_PACKAGE_THTTPD bool "thttpd" depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_LIBXCRYPT if BR2_TOOLCHAIN_USES_GLIBC help thttpd is a simple, small, portable, fast, and secure HTTP server diff --git a/package/thttpd/thttpd.mk b/package/thttpd/thttpd.mk index 3815705b58..d9cb5c9071 100644 --- a/package/thttpd/thttpd.mk +++ b/package/thttpd/thttpd.mk @@ -12,6 +12,10 @@ THTTPD_CPE_ID_VENDOR = acme THTTPD_MAKE = $(MAKE1) +ifeq ($(BR2_PACKAGE_LIBXCRYPT),y) +THTTPD_DEPENDENCIES += libxcrypt +endif + define THTTPD_INSTALL_TARGET_CMDS $(INSTALL) -D -m 0755 $(@D)/thttpd $(TARGET_DIR)/usr/sbin/thttpd $(INSTALL) -D -m 0755 $(@D)/extras/htpasswd $(TARGET_DIR)/usr/bin/htpasswd