ppp: fix build with kernel 4.14.9+
authorMathias Kresin <dev@kresin.me>
Tue, 2 Jan 2018 00:01:33 +0000 (01:01 +0100)
committerMathias Kresin <dev@kresin.me>
Tue, 20 Feb 2018 18:25:17 +0000 (19:25 +0100)
With a9772285a724 ("linux/compiler.h: Split into compiler.h and
compiler_types.h") compiler.h was refactored and most its content was
moved to compiler_types.h. Both files are required to build ppp-mod-pppoa.

Signed-off-by: Mathias Kresin <dev@kresin.me>
package/network/services/ppp/Makefile

index 0614ebc58b370225ba9632dd58e1bbda95fb62d7..beeaa53c220c76ce9d875cd0ff2700186ab9654c 100644 (file)
@@ -178,10 +178,15 @@ $(call Build/Configure/Default,, \
        UNAME_M="$(ARCH)" \
 )
        mkdir -p $(PKG_BUILD_DIR)/pppd/plugins/pppoatm/linux
-       cp \
+       $(CP) \
                $(LINUX_DIR)/include/linux/compiler.h \
                $(LINUX_DIR)/include/$(LINUX_UAPI_DIR)linux/atm*.h \
                $(PKG_BUILD_DIR)/pppd/plugins/pppoatm/linux/
+
+       # Kernel 4.14.9+ only, ignore the exit status of cp in case the file
+       # doesn't exits
+       -$(CP) $(LINUX_DIR)/include/linux/compiler_types.h \
+               $(PKG_BUILD_DIR)/pppd/plugins/pppoatm/linux/
 endef
 
 TARGET_CFLAGS += -ffunction-sections -fdata-sections