Guest User

Vmware workstation 8 patch for kernel 3.1r

a guest
Sep 20th, 2011
1,328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.15 KB | None | 0 0
  1. #!/bin/bash
  2. # -*- coding: UTF8 -*-
  3.  
  4. FOLDER=/tmp/$RANDOM$RANDDOM
  5.  
  6.  
  7. mkdir $FOLDER
  8.  
  9. cd  $FOLDER
  10. cp /usr/lib/vmware/modules/source/{vmnet.tar,vmnet.tar.old}
  11. tar xvf /usr/lib/vmware/modules/source/vmnet.tar
  12. patch -p0 << EOF
  13. --- vmnet-only/compat_netdevice.h   2011-03-26 06:37:29.000000000 +0100
  14. +++ vmnet-only/compat_netdevice.h   2011-08-10 08:17:57.000000000 +0200
  15. @@ -47,6 +47,19 @@
  16.  #   define net_device device
  17.  #endif
  18.  
  19. +/* it looks like these have been removed from the kernel 3.1
  20. + * probably because the "transition" is considered complete.
  21. + * so to keep this source compatible we just redefine them like they were
  22. + * previously
  23. + */
  24. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
  25. +#define HAVE_ALLOC_NETDEV      /* feature macro: alloc_xxxdev
  26. +                      functions are available. */
  27. +#define HAVE_FREE_NETDEV       /* free_netdev() */
  28. +#define HAVE_NETDEV_PRIV       /* netdev_priv() */
  29. +#define HAVE_NETIF_QUEUE
  30. +#define HAVE_NET_DEVICE_OPS
  31. +#endif
  32.  
  33.  /*
  34.   * SET_MODULE_OWNER appeared sometime during 2.3.x. It was setting
  35. EOF
  36. tar cf /usr/lib/vmware/modules/source/vmnet.tar vmnet-only
  37. vmware-modconfig --console --install-all
  38. rm -rf  $FOLDER
Advertisement
Add Comment
Please, Sign In to add comment