linuxptp: fix build failure 12298/head
authorPaulo Machado <pffmachado@yahoo.com>
Mon, 25 May 2020 10:31:18 +0000 (11:31 +0100)
committerPaulo Machado <pffmachado@yahoo.com>
Tue, 26 May 2020 15:29:39 +0000 (16:29 +0100)
Build is failing because HWTSTAMP_TX_ONESTEP_P2P is defined anymore on
linux net_tstamp.h.

Moreover, the usual way of linuxptp build is looking for system includes
unless user defines differently. That also was tried to fix.

PKG_RELEASE bumped to 3.

Signed-off-by: Paulo Machado <pffmachado@yahoo.com>
net/linuxptp/Makefile
net/linuxptp/patches/001-fix_kbuild_output.patch [new file with mode: 0644]

index d968081594b562e36d4ed99defcfaa71c7fd774e..34e8c4324bfdf05e761eb2aaf9cc8d6ef7addc69 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=linuxptp
 PKG_VERSION:=2.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
 PKG_SOURCE_URL:=@SF/$(PKG_NAME)/v$(PKG_VERSION)
@@ -20,6 +20,7 @@ PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
 
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/kernel.mk
 
 define Package/linuxptp
   SECTION:=net
@@ -39,7 +40,8 @@ endef
 EXTRA_CFLAGS += -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC
 
 MAKE_VARS += \
-       EXTRA_CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CFLAGS)"
+       EXTRA_CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CFLAGS)" \
+       KBUILD_OUTPUT="$(LINUX_DIR)"
 
 define Package/linuxptp/install
        $(INSTALL_DIR) $(1)/usr/sbin
diff --git a/net/linuxptp/patches/001-fix_kbuild_output.patch b/net/linuxptp/patches/001-fix_kbuild_output.patch
new file mode 100644 (file)
index 0000000..66d6b39
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/incdefs.sh
++++ b/incdefs.sh
+@@ -62,7 +62,7 @@ user_flags()
+ kernel_flags()
+ {
+       prefix=""
+-      tstamp=/usr/include/linux/net_tstamp.h
++      tstamp=/include/uapi/linux/net_tstamp.h
+       if [ "x$KBUILD_OUTPUT" != "x" ]; then
+               # With KBUILD_OUTPUT set, we are building against