2007-03-16

2.6.20-1.2925.fc6 and vmware


$ sudo vmware-config.pl
...
In file included from /tmp/vmware-config1/vmmon-only/linux/driver.c:80:
/tmp/vmware-config1/vmmon-only/./include/compat_kernel.h:21: error: expected declaration specifiers or ‘...’ before ‘compat_exit’
/tmp/vmware-config1/vmmon-only/./include/compat_kernel.h:21: error: expected declaration specifiers or ‘...’ before ‘exit_code’
/tmp/vmware-config1/vmmon-only/./include/compat_kernel.h:21: warning: type defaults to ‘int’ in declaration of ‘_syscall1’
make[2]: *** [/tmp/vmware-config1/vmmon-only/linux/driver.o] Error 1
make[1]: *** [_module_/tmp/vmware-config1/vmmon-only] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.20-1.2925.fc6-i686'
make: *** [vmmon.ko] Error 2
make: Leaving directory `/tmp/vmware-config1/vmmon-only'
Unable to build the vmmon module.
The Fix
$ cd /usr/lib/vmware/modules/source
$ sudo cp vmmon.tar vmmon.tar.orig
$ vi vmmon-only/include/compat_kernel.h
...
static inline _syscall1(int, compat_exit, int, exit_code);
...
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
static inline _syscall1(int, compat_exit, int, exit_code);
#endif
...
$ sudo rm vmmon.tar
$ sudo tar cf vmmont.tar vmmon-only
$ sudo vmware-config.pl