[include] fixes uapi helper define
authorJohn Crispin <john@openwrt.org>
Sun, 16 Dec 2012 11:04:27 +0000 (11:04 +0000)
committerJohn Crispin <john@openwrt.org>
Sun, 16 Dec 2012 11:04:27 +0000 (11:04 +0000)
SVN-Revision: 34715

include/kernel.mk
package/network/services/ppp/Makefile

index eabf9484fa17484b187107084869ce73f6dde3d2..6185237765472355349e4b1b0a7bf5163cff6dca 100644 (file)
@@ -35,8 +35,9 @@ else
   endif
   KERNEL_BUILD_DIR ?= $(BUILD_DIR)/linux-$(BOARD)$(if $(SUBTARGET),_$(SUBTARGET))
   LINUX_DIR ?= $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)
-  LINUX_UAPI_DIR=$(firstword $(wildcard $(LINUX_DIR)/include/uapi $(LINUX_DIR)/include))
-
+  ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,3.7.0)),1)
+    LINUX_UAPI_DIR=uapi/
+  endif
   LINUX_VERMAGIC:=$(strip $(shell cat $(LINUX_DIR)/.vermagic 2>/dev/null))
   LINUX_VERMAGIC:=$(if $(LINUX_VERMAGIC),$(LINUX_VERMAGIC),unknown)
 
index 49c6a40a4c03f03ead92b3f5596826f2a1d1cda7..71c598196bdb0c64b2e021fcdc38c64bab29343b 100644 (file)
@@ -158,7 +158,7 @@ $(call Build/Configure/Default,, \
        mkdir -p $(PKG_BUILD_DIR)/pppd/plugins/pppoatm/linux
        cp \
                $(LINUX_DIR)/include/linux/compiler.h \
-               $(LINUX_UAPI_DIR)/linux/atm*.h \
+               $(LINUX_DIR)/include/$(LINUX_UAPI_DIR)linux/atm*.h \
                $(PKG_BUILD_DIR)/pppd/plugins/pppoatm/linux/
 endef