Guest
Public paste!

Igor

By: a guest | Mar 23rd, 2008 | Syntax: None | Size: 1.91 KB | Hits: 335 | Expires: Never
Copy text to clipboard
  1. diff -ru vmnet-only.org/compat_wait.h vmnet-only/compat_wait.h
  2. --- vmnet-only.org/compat_wait.h        2008-03-03 21:16:14.000000000 -0500
  3. +++ vmnet-only/compat_wait.h    2008-03-23 02:26:10.000000000 -0400
  4.  -34,13 +34,13 @@
  5.   * 2.4.20-wolk4.0s.
  6.   */
  7.  
  8. -#if VMW_HAVE_EPOLL // {
  9. +#ifdef VMW_HAVE_EPOLL // {
  10.  #define compat_poll_wqueues struct poll_wqueues
  11.  #else // } {
  12.  #define compat_poll_wqueues poll_table
  13.  #endif // }
  14.  
  15. -#if VMW_HAVE_EPOLL // {
  16. +#ifdef VMW_HAVE_EPOLL // {
  17.  
  18.  /* If prototype does not match, build will abort here */
  19.  extern void poll_initwait(compat_poll_wqueues *);
  20. diff -ru vmnet-only.org/sk_alloc.c vmnet-only/sk_alloc.c
  21. --- vmnet-only.org/sk_alloc.c   2008-03-03 21:16:14.000000000 -0500
  22. +++ vmnet-only/sk_alloc.c       2008-03-23 02:26:10.000000000 -0400
  23.  -8,6 +8,7 @@
  24.  
  25.  #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 13)
  26.  #include <net/sock.h>
  27. +#include <linux/version.h>
  28.  
  29.  static struct proto test_proto = {
  30.     .name     = "TEST",
  31.  -16,6 +17,10 @@
  32.  struct sock *
  33.  vmware_sk_alloc(void)
  34.  {
  35. +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)
  36.     return sk_alloc(PF_NETLINK, 0, &test_proto, 1);
  37. +#else
  38. +   return sk_alloc(&init_net, PF_NETLINK, 0, &test_proto);
  39. +#endif
  40.  }
  41.  #endif
  42. diff -ru vmnet-only.org/vm_basic_types.h vmnet-only/vm_basic_types.h
  43. --- vmnet-only.org/vm_basic_types.h     2008-03-03 21:16:14.000000000 -0500
  44. +++ vmnet-only/vm_basic_types.h 2008-03-23 02:26:10.000000000 -0400
  45.  -163,6 +163,8 @@
  46.  #   endif
  47.  
  48.  #   ifndef _STDINT_H
  49. +#      include <linux/version.h>
  50. +#      if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)
  51.  #      ifdef VM_I386
  52.  #         ifdef VM_X86_64
  53.               typedef uint64    uintptr_t;
  54.  -175,6 +177,7 @@
  55.            typedef uint64    uintptr_t;
  56.  #      endif
  57.  #   endif
  58. +#   endif
  59.  #endif
  60.  
  61.  
  62.  -270,6 +273,7 @@
  63.  #define CHOOSE_PERCENT  asPercent(-1)
  64.  
  65.  
  66. +#include <linux/types.h>
  67.  typedef uintptr_t VA;
  68.  typedef uintptr_t VPN;