vmware-host-modules
vmware-host-modules copied to clipboard
Solve error: 'dev_base_lock' undeclared
Because after we use the script to obtain the code, a "dev_base_lock undeclared" code error occurs during compilation. Let's solve this code error problem.
#Switch root user cd /tmp/patch-vmware/vmware-host-modules/vmnet-only vim vmnetInt.h
#define read_lock_list() read_lock(&dev_base_lock) #define read_unlock_list() read_unlock(&dev_base_lock)
change
#define read_lock_list() rcu_read_lock() #define read_unlock_list() rcu_read_unlock()
cd /tmp/patch-vmware/vmware-host-modules make make install modprobe vmmon vmnet
#Now start vmware
lol
Bravo
I just did made this into a pull request.
In my case, additional changes to the bridge.c file are required.
bridge.c: In function ‘VNetBridgeReceiveFromVNet’:
bridge.c:587:4: error: implicit declaration of function ‘dev_lock_list’; did you mean ‘read_lock_list’? [-Wimplicit-function-declaration]
587 | dev_lock_list();
| ^~~~~~~~~~~~~
| read_lock_list
bridge.c:590:7: error: implicit declaration of function ‘dev_unlock_list’; did you mean ‘read_unlock_list’? [-Wimplicit-function-declaration]
590 | dev_unlock_list();
| ^~~~~~~~~~~~~~~
| read_unlock_list
The lines I needed to edit on 16.2.5 were slightly different
#define dev_lock_list() read_lock(&dev_base_lock) #define dev_unlock_list() read_unlock(&dev_base_lock)
Changed to:
#define dev_lock_list() rcu_read_lock() #define dev_unlock_list() rcu_read_unlock()
Works great, thanks!!