--- src/VBox/HostDrivers/Support/linux/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) Index: VirtualBox-3.0.2_OSE/src/VBox/HostDrivers/Support/linux/Makefile =================================================================== --- VirtualBox-3.0.2_OSE.orig/src/VBox/HostDrivers/Support/linux/Makefile 2009-07-10 18:41:29.000000000 +0300 +++ VirtualBox-3.0.2_OSE/src/VBox/HostDrivers/Support/linux/Makefile 2009-07-31 23:18:03.211136640 +0300 @@ -139,8 +139,8 @@ ifeq ($(KERNELRELEASE),) # kernel base directory ifndef KERN_DIR - # build for the current kernel, version check - KERN_DIR := /lib/modules/$(shell uname -r)/build + # build for the current kernel, version check + KERN_DIR := /lib/modules/$(KERNELRELEASE)/build ifneq ($(shell if test -d $(KERN_DIR); then echo yes; fi),yes) KERN_DIR := /usr/src/linux ifneq ($(shell if test -d $(KERN_DIR); then echo yes; fi),yes) @@ -154,9 +154,9 @@ ifeq ($(KERNELRELEASE),) # check if versions match -- works only for later 2.6 kernels VBOX_KERN_VER := $(shell $(MAKE) -sC $(KERN_DIR) --no-print-directory kernelrelease 2> /dev/null || true) ifneq ($(VBOX_KERN_VER),) - ifneq ($(VBOX_KERN_VER),$(shell uname -r)) + ifneq ($(VBOX_KERN_VER),$(KERNELRELEASE)) $(error Error: /usr/src/linux (version $(VBOX_KERN_VER)) does not match \ - the current kernel (version $(shell uname -r))) + the current kernel (version $(KERNELRELEASE))) endif endif else @@ -178,7 +178,7 @@ ifeq ($(KERNELRELEASE),) # module install dir, only for current kernel ifneq ($(filter install install_rpm,$(MAKECMDGOALS)),) ifndef MODULE_DIR - MODULE_DIR_TST := /lib/modules/$(shell uname -r) + MODULE_DIR_TST := /lib/modules/$(KERNELRELEASE) ifeq ($(shell if test -d $(MODULE_DIR_TST); then echo yes; fi),yes) MODULE_DIR := $(MODULE_DIR_TST)/misc else