From 3e6f47a5d3cd6fbc5574d376dd47b21dd731dfa4 Mon Sep 17 00:00:00 2001 From: Stefan Jumarea Date: Sat, 29 Oct 2022 13:05:50 +0300 Subject: [PATCH] glue.c: Remove multiple definitions when using Musl Musl provides the `catclose`, `catopen` and `catgets` functions, so when building `libcxx` with Musl the linking fails. This commit only defines the needed functions when `LIBMUSL` is not selected. Signed-off-by: Stefan Jumarea Reviewed-by: Maria Sfiraiala Reviewed-by: Razvan Deaconescu Approved-by: Razvan Deaconescu Tested-by: Unikraft CI GitHub-Closes: #17 --- glue.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/glue.c b/glue.c index b65464b..6c60a7a 100644 --- a/glue.c +++ b/glue.c @@ -20,7 +20,9 @@ */ #include +#include +#ifndef CONFIG_LIBMUSL int catclose(nl_catd catalog) { return 0; @@ -36,5 +38,6 @@ char *catgets(nl_catd catalog, int set_number, int message_number, { return 0; } +#endif void *__dso_handle = (void *) &__dso_handle; -- 2.39.5