Skip to content

Commit

Permalink
vmnet: fix build on recent kernels (6.x)
Browse files Browse the repository at this point in the history
See here for source: mkubecek#239 (comment)

Signed-off-by: Nahuel Gómez <[email protected]>
  • Loading branch information
Flopster101 committed Aug 11, 2024
1 parent 2c6d66f commit f87197d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions vmnet-only/vmnetInt.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,13 @@
compat_skb_set_network_header(skb, sizeof (struct ethhdr)), \
dev_queue_xmit(skb) \
)
#define dev_lock_list() read_lock(&dev_base_lock)
#define dev_unlock_list() read_unlock(&dev_base_lock)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 9, 0)
# define dev_lock_list() rcu_read_lock()
# define dev_unlock_list() rcu_read_unlock()
#else
# define dev_lock_list() read_lock(&dev_base_lock)
# define dev_unlock_list() read_unlock(&dev_base_lock)
#endif


extern struct proto vmnet_proto;
Expand Down

0 comments on commit f87197d

Please sign in to comment.