int main(int argc, char **argv)
{
#if defined(ENABLE_LIBJVM)
- const char* path;
+ char* path;
# if defined(ENABLE_JRE_LAYOUT)
int len;
# if defined(ENABLE_JRE_LAYOUT)
/* SUN also uses a buffer of 4096-bytes (strace is your friend). */
- path = malloc(sizeof(char) * 4096);
+ path = (char*) os::malloc(sizeof(char) * 4096);
if (readlink("/proc/self/exe", path, 4095) == -1) {
fprintf(stderr, "main: readlink failed: %s\n", strerror(errno));
strcat(path, "/../lib/"LIBJVM_NAME);
# else
- path = CACAO_LIBDIR"/"LIBJVM_NAME;
+ path = (char*) CACAO_LIBDIR"/"LIBJVM_NAME;
# endif
/* First try to open where dlopen searches, e.g. LD_LIBRARY_PATH.