aboutsummaryrefslogtreecommitdiff
path: root/libjava/prims.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/prims.cc')
-rw-r--r--libjava/prims.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/libjava/prims.cc b/libjava/prims.cc
index 3db82c19fa7..dfeb95766af 100644
--- a/libjava/prims.cc
+++ b/libjava/prims.cc
@@ -1788,11 +1788,14 @@ _Jv_PrependVersionedLibdir (char* libpath)
{
// LD_LIBRARY_PATH is not prefixed with
// GCJ_VERSIONED_LIBDIR.
- jsize total = (sizeof (GCJ_VERSIONED_LIBDIR) - 1)
- + (sizeof (PATH_SEPARATOR) - 1) + strlen (libpath) + 1;
+ char path_sep[2];
+ path_sep[0] = (char) _Jv_platform_path_separator;
+ path_sep[1] = '\0';
+ jsize total = ((sizeof (GCJ_VERSIONED_LIBDIR) - 1)
+ + 1 /* path separator */ + strlen (libpath) + 1);
retval = (char*) _Jv_Malloc (total);
strcpy (retval, GCJ_VERSIONED_LIBDIR);
- strcat (retval, PATH_SEPARATOR);
+ strcat (retval, path_sep);
strcat (retval, libpath);
}
}