[patch] vmkit compiled using gcc

I have tested compiling vmkit using gcc3.4 and gcc4.4
Some vmkit files required that I added some explicit typecasts and #includes in order to compile.
I have attached my changes against the vmkit svn trunk rev 69439
Using this patch both versions of gcc managed to compiled vmkit on my machine.

Cheers
Xerxes

vmkit_r69439_svn_compile_gcc.patch (2.31 KB)

Applied thanks!
http://lists.cs.uiuc.edu/pipermail/vmkit-commits/2009-April/000815.html

Btw, what are the error messages for these?

- char * res = strstr(haystack, needle);
+ char * res = (char *)strstr(haystack, needle);
- char* ptr = strrchr(name, '/');
+ char* ptr = (char*)strrchr(name, '/');

Nicolas

Xerxes Rånby wrote:

Den 2009-04-18 15:38, Nicolas Geoffray skrev:

Applied thanks!
http://lists.cs.uiuc.edu/pipermail/vmkit-commits/2009-April/000815.html

Btw, what are the error messages for these?
   

- char * res = strstr(haystack, needle);
+ char * res = (char *)strstr(haystack, needle);
     

make[3]: Entering directory `/home/xranby/vmkit/lib/JnJVM/VMCore'
llvm[3]: Compiling Jnjvm.cpp for Debug build
Jnjvm.cpp: In function 'int sys_strnstr(const char*, const char*)':
Jnjvm.cpp:515: error: invalid conversion from 'const char*' to 'char*'
make[3]: *** [/home/xranby/vmkit/lib/JnJVM/VMCore/Debug/Jnjvm.o] Error 1

- char* ptr = strrchr(name, '/');
+ char* ptr = (char*)strrchr(name, '/');
     

llvm[3]: Compiling JnjvmClassLoader.cpp for Debug build
JnjvmClassLoader.cpp: In member function 'void jnjvm::JnjvmClassLoader::loadLibFromJar(jnjvm::Jnjvm*, const char*, const char*)':
JnjvmClassLoader.cpp:999: error: invalid conversion from 'const char*' to 'char*'
make[3]: *** [/home/xranby/vmkit/lib/JnJVM/VMCore/Debug/JnjvmClassLoader.o] Error 1

Cheers, and have a great day!
Xerxes