From: Stefan Jumarea Date: Sat, 29 Oct 2022 10:05:50 +0000 (+0300) Subject: glue.c: Remove multiple definitions when using Musl X-Git-Tag: RELEASE-0.11.0~6 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=3e6f47a5d3cd6fbc5574d376dd47b21dd731dfa4;p=unikraft%2Flibs%2Flibcxx.git 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 --- 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;