From 74da075a1d52e6b6ebefe15f2025e4b9d4928262 Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Thu, 28 Mar 2024 07:56:09 +0000 Subject: [PATCH] backend: Fix for missing _DYNAMIC declaration in musl libc The _DYNAMIC symbol is not declared in musl link.h causing a build error. Decalare it manually to fix this. Signed-off-by: Naushir Patuck --- src/libpisp/backend/backend_default_config.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libpisp/backend/backend_default_config.cpp b/src/libpisp/backend/backend_default_config.cpp index f844dca..d327a76 100644 --- a/src/libpisp/backend/backend_default_config.cpp +++ b/src/libpisp/backend/backend_default_config.cpp @@ -20,6 +20,10 @@ #include "common/pisp_pwl.hpp" #include "pisp_be_config.h" +// musl doesn't declare _DYNAMIC in link.h, declare it manually, see: +// https://github.com/raspberrypi/libpisp/issues/25 +extern ElfW(Dyn) _DYNAMIC[]; + using json = nlohmann::json; // Where it might be helpful we initialise some blocks with the "obvious" default parameters. This saves users the trouble,