diff --git a/srcpkgs/retroshare/patches/musl.patch b/srcpkgs/retroshare/patches/musl.patch index d0acb386965..87db0292dd0 100644 --- a/srcpkgs/retroshare/patches/musl.patch +++ b/srcpkgs/retroshare/patches/musl.patch @@ -25,3 +25,32 @@ +#endif // defined(__linux__) && defined(__GLIBC__) #endif // _STACKTRACE_H_ +--- libretroshare/src/util/rsdir.cc.orig 2017-05-21 00:02:56.024215330 +0200 ++++ libretroshare/src/util/rsdir.cc 2017-05-21 00:05:01.129867612 +0200 +@@ -57,6 +57,25 @@ + #include + #endif + ++#ifndef __GLIBC__ ++#include ++#include ++#include ++#include ++static char * canonicalize_file_name(const char *path) ++{ ++ char buf[PATH_MAX] = { }; ++ ++ snprintf(buf, sizeof(buf) - 1, "%s", path); ++ ++ if (!realpath(path, buf)) ++ return NULL; ++ ++ return strdup(buf); ++} ++#endif ++ ++ + /**** + * #define RSDIR_DEBUG 1 + ****/ +