VMware modules, Arch Linux & kernel 4.8.13

After upgrading the kernel to 4.8.13-1-ARCH some of the vmware kernel modules failed to compile:

/tmp/modconfig-6BT70S/vmmon-only/linux/hostif.c:1592:47: error: ‘NR_ANON_PAGES’ undeclared (first use in this function)
/tmp/modconfig-BBuLH6/vmnet-only/netif.c:468:7: error: ‘struct net_device’ has no member named ‘trans_start’; did you mean ‘mem_start’?

The fix:

[codesyntax lang="bash"]

cd /usr/lib/vmware/modules/source
tar xf vmnet.tar
tar xf vmmon.tar
mv vmnet.tar vmnet.old.tar
mv vmmon.tar vmmon.old.tar
sed -i -e 's/dev->trans_start = jiffies/netif_trans_update(dev)/g' vmnet-only/netif.c
sed -i -e 's/unsigned int anonPages = global_page_state(NR_ANON_PAGES);/unsigned int anonPages = global_page_state(NR_ANON_MAPPED);/g' vmmon-only/hostif.c
tar cf vmnet.tar vmnet-only
tar cf vmmon.tar vmmon-only
rm -r vmnet-only
rm -r vmmon-only

vmware-modconfig --console --install-all


  1. Hervé Mutombo

    Thank you very much for this post! It saved a day!

Scrie si tu o vorbulita

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.