summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/relocatable.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/relocatable.c b/lib/relocatable.c
index 60cb54ac7e..401f3e0e45 100644
--- a/lib/relocatable.c
+++ b/lib/relocatable.c
@@ -539,6 +539,18 @@ relocate (const char *pathname)
}
#ifdef __EMX__
+# ifdef __KLIBC__
+# undef strncmp
+
+ if (pathname && strncmp (pathname, "/@unixroot", 10) == 0
+ && (pathname[10] == '\0' || pathname[10] == '/' || pathname[10] == '\\'))
+ {
+ /* kLIBC itself processes /@unixroot prefix */
+
+ return pathname;
+ }
+ else
+# endif
if (pathname && ISSLASH (pathname[0]))
{
const char *unixroot = getenv ("UNIXROOT");