From e54025a3f40e8abdb9c723da596e70d883d1326f Mon Sep 17 00:00:00 2001 From: Stephen Walker Date: Sat, 9 Jul 2016 15:10:23 -0400 Subject: [PATCH 1/2] linuxptp: include time.h to fix unknown type name 'time_t' error with musl, refresh patches In file included from print.h:25:0, from linreg.c:24: util.h:364:32: error: unknown type name 'time_t' int rate_limited(int interval, time_t *last); ^ Signed-off-by: Stephen Walker --- net/linuxptp/patches/001-musl-fix.patch | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/net/linuxptp/patches/001-musl-fix.patch b/net/linuxptp/patches/001-musl-fix.patch index 41302c7b3..b79a84bad 100644 --- a/net/linuxptp/patches/001-musl-fix.patch +++ b/net/linuxptp/patches/001-musl-fix.patch @@ -1,7 +1,5 @@ -Index: linuxptp-20151118/raw.c -=================================================================== ---- linuxptp-20151118.orig/raw.c 2016-01-08 13:39:56.000000000 +0100 -+++ linuxptp-20151118/raw.c 2016-01-13 09:16:51.951784148 +0100 +--- a/raw.c ++++ b/raw.c @@ -20,7 +20,6 @@ #include #include @@ -10,3 +8,14 @@ Index: linuxptp-20151118/raw.c #include #include #include +--- a/util.h ++++ b/util.h +@@ -20,6 +20,8 @@ + #ifndef HAVE_UTIL_H + #define HAVE_UTIL_H + ++#include ++ + #include "ddt.h" + #include "ether.h" + From 87044ef55ce15a8a73fb6ec50ca70f75348d7787 Mon Sep 17 00:00:00 2001 From: Stephen Walker Date: Tue, 19 Jul 2016 19:02:02 -0400 Subject: [PATCH 2/2] linuxptp: pass TARGET_CFLAGS using MAKE_VARS, bump PKG_RELEASE ccache_cc -Wall -DVER=1.6 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o ptp4l.o ptp4l.c cc1: note: someone does not honour COPTS correctly, passed 0 times unpatched 8229 hwstamp_ctl 128213 phc2sys 37045 phc_ctl 99077 pmc 185589 ptp4l 41141 timemaster patched (honouring -Os CFLAG) 8213 hwstamp_ctl 54469 phc2sys 20645 phc_ctl 49877 pmc 74965 ptp4l 20645 timemaster Signed-off-by: Stephen Walker --- net/linuxptp/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/net/linuxptp/Makefile b/net/linuxptp/Makefile index 9bc881da9..88edd155a 100644 --- a/net/linuxptp/Makefile +++ b/net/linuxptp/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2015 OpenWrt.org +# Copyright (C) 2015-2016 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=linuxptp PKG_VERSION:=20151118 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_REV:=999c86f4a9da4bf4508b3a69289f58166ed18a55 PKG_MAINTAINER:=Wojciech Dubowik @@ -41,6 +41,9 @@ define Package/linuxptp/description computers. endef +MAKE_VARS += \ + EXTRA_CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" + define Package/linuxptp/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_BUILD_DIR)/hwstamp_ctl $(1)/usr/sbin/