[openwrt/openwrt] include/prereq-build: fix ldconfig-stub symlink on macos and BSD OSs

LEDE Commits lede-commits at lists.infradead.org
Tue Sep 27 07:58:24 PDT 2022


ansuel pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/c092b3ba63e0a60be2a5bc9aa716c26f4c6f3755

commit c092b3ba63e0a60be2a5bc9aa716c26f4c6f3755
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Tue Sep 27 16:54:42 2022 +0200

    include/prereq-build: fix ldconfig-stub symlink on macos and BSD OSs
    
    Some OS may have the true bin to a different location than /bin/true.
    BSD based system and macos have true on /usr/bin/true.
    
    Fix this by checking both location and take the one available in the
    system.
    
    Reported-by: Sergey V. Lobanov <sergey at lobanov.in>
    Suggested-by: Huangbin Zhan <zhanhb88 at gmail.com>
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 include/prereq-build.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/prereq-build.mk b/include/prereq-build.mk
index e1687da370..c5c2f1c8bb 100644
--- a/include/prereq-build.mk
+++ b/include/prereq-build.mk
@@ -213,4 +213,4 @@ prereq: $(STAGING_DIR_HOST)/bin/mkhash $(STAGING_DIR_HOST)/bin/xxd
 
 # Install ldconfig stub
 $(eval $(call TestHostCommand,ldconfig-stub,Failed to install stub, \
-	$(LN) /bin/true $(STAGING_DIR_HOST)/bin/ldconfig))
+	$(LN) $(firstword $(wildcard /bin/true /usr/bin/true)) $(STAGING_DIR_HOST)/bin/ldconfig))




More information about the lede-commits mailing list