With a little side of applesauce...

Monday, February 5, 2007

VMware beta 6 - patch for compat_kernel.h

I had a problem compiling the vmmon kernel module for VMware beta 6 (and VMware 5.5.3), when running on Ubuntu Feisty and kernel >= 2.6.20. The error was:

CC [M] /tmp/vmware-config0/vmmon-only/linux/driver.o
In file included from /tmp/vmware-config0/vmmon-only/linux/driver.c:80:
/tmp/vmware-config0/vmmon-only/./include/compat_kernel.h:21: error: expected declaration specifiers or ‘...’ before ‘compat_exit’
/tmp/vmware-config0/vmmon-only/./include/compat_kernel.h:21: error: expected declaration specifiers or ‘...’ before ‘exit_code’
/tmp/vmware-config0/vmmon-only/./include/compat_kernel.h:21: warning: type defaults to ‘int’ in declaration of ‘_syscall1’
make[2]: *** [/tmp/vmware-config0/vmmon-only/linux/driver.o] Error 1
make[1]: *** [_module_/tmp/vmware-config0/vmmon-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.20-1-generic'
make: *** [vmmon.ko] Error 2
make: Leaving directory `/tmp/vmware-config0/vmmon-only'
Unable to build the vmmon module.


Here is a patch for the compat_kernel.h in vmmon.tar:

--- compat_kernel.h     2006-11-13 13:06:18.000000000 -0800
+++ ../../vmmon-only.20/include/compat_kernel.h 2006-12-22 07:02:59.000000000 -0800
@@ -18,7 +18,9 @@
* provided by x86-64, arm and other (but not by i386).
*/
#define __NR_compat_exit __NR_exit
+#if LINUX_VERSION_CODE < color="navy">static inline _syscall1(int, compat_exit, int, exit_code);
+#endif


/*

From:
http://www.vmware.com/community/thread.jspa?threadID=65982&tstart=30

Ubuntu specific instructions are here:
http://www.vmware.com/community/message.jspa?messageID=542738#542738

1 comment:

speeves said...

You can also grab the vmware-any-any-update109.tar.gz from:
http://platan.vc.cvut.cz/ftp/pub/vmware/

Thanks Petr!!

Reference:
http://www.vmware.com/community/thread.jspa?messageID=634580