Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > cf2c6e34b827c5e84eb0ae0e575c3fbf > files > 4

virtualbox-2.0.2-2.2mdv2009.0.src.rpm

diff -p -up VirtualBox-1.5.6_OSE/src/VBox/HostDrivers/Support/linux/Makefile.kernelrelease VirtualBox-1.5.6_OSE/src/VBox/HostDrivers/Support/linux/Makefile
--- VirtualBox-1.5.6_OSE/src/VBox/HostDrivers/Support/linux/Makefile.kernelrelease	2008-02-19 12:49:05.000000000 +0100
+++ VirtualBox-1.5.6_OSE/src/VBox/HostDrivers/Support/linux/Makefile	2008-02-26 22:43:17.000000000 +0100
@@ -67,8 +67,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)
@@ -82,9 +82,9 @@ ifeq ($(KERNELRELEASE),)
   # check if versions match -- works only for later 2.6 kernels
   VBOX_KERN_VER := $(shell $(MAKE) -sC $(KERN_DIR) 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
@@ -106,7 +106,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