summarylogtreecommitdiffstats
path: root/vmnet.patch
diff options
context:
space:
mode:
Diffstat (limited to 'vmnet.patch')
-rw-r--r--vmnet.patch50
1 files changed, 23 insertions, 27 deletions
diff --git a/vmnet.patch b/vmnet.patch
index a6e65d7cfc45..444c08f5525e 100644
--- a/vmnet.patch
+++ b/vmnet.patch
@@ -12,6 +12,29 @@
# Header directory for the running kernel
ifdef LINUXINCLUDE
+@@ -100,6 +104,13 @@ auto-build: $(DRIVER_KO)
+ $(DRIVER): $(DRIVER_KO)
+ if [ $< -nt $@ ] || [ ! -e $@ ] ; then cp -f $< $@; fi
+
++# Use SUBDIRS on 2.x, 3.x, 4.x. Use M on newer kernels.
++ifeq ($(filter-out 2 3 4,$(firstword $(subst ., ,$(VM_UNAME)))),)
++DIRVAR := SUBDIRS
++else
++DIRVAR := M
++endif
++
+ # Pass gcc version down the chain, so we can detect if kernel attempts to use unapproved compiler
+ VM_CCVER := $(VMCCVER)
+ export VM_CCVER
+@@ -117,7 +128,7 @@ prebuild:: ;
+ postbuild:: ;
+
+ $(DRIVER_KO): prebuild
+- $(MAKE) -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
++ $(MAKE) -C $(BUILD_DIR) $(DIRVAR)=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
+ MODULEBUILDDIR=$(MODULEBUILDDIR) modules
+ $(MAKE) -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
+ MODULEBUILDDIR=$(MODULEBUILDDIR) postbuild
--- a/vmnet/bridge.c
+++ b/vmnet/bridge.c
@@ -636,7 +636,7 @@
@@ -164,30 +187,3 @@
# define compat_sk_alloc(_bri, _pri) sk_alloc(&init_net, \
PF_NETLINK, _pri, &vmnet_proto, 1)
#elif defined(VMW_NETDEV_HAS_NET)
-From 8ba37a5023f939ba8d2e0d91b916ff442b1c18dd Mon Sep 17 00:00:00 2001
-From: Michal Kubecek <mkubecek@suse.cz>
-Date: Mon, 31 Dec 2018 00:05:42 +0100
-Subject: [PATCH] modules: replace SUBDIRS with M
-
-Since commit 0126be38d988 ("kbuild: announce removal of SUBDIRS if used")
-in v5.0-rc1, using SUBDIRS when building out of tree modules produces
-a deprecation warning. As M used to work since pretty much ever, use it
-unconditionally.
----
- vmmon-only/Makefile | 2 +-
- vmnet-only/Makefile | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/vmnet-only/Makefile b/vmnet-only/Makefile
-index caab6b9..c2fc51f 100644
---- a/vmnet-only/Makefile
-+++ b/vmnet-only/Makefile
-@@ -121,7 +121,7 @@ prebuild:: ;
- postbuild:: ;
-
- $(DRIVER_KO): prebuild
-- $(MAKE) -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
-+ $(MAKE) -C $(BUILD_DIR) M=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
- MODULEBUILDDIR=$(MODULEBUILDDIR) modules
- $(MAKE) -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
- MODULEBUILDDIR=$(MODULEBUILDDIR) postbuild