From a0a989fbc560c472edaa737978e61ba186548da8 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Mon, 18 Feb 2013 12:55:17 +0100 Subject: [PATCH] update to 1.1 --- .gitignore | 1 + linuxptp-aliasing.patch | 19 +++++++++++++++++++ linuxptp.spec | 9 ++++++--- sources | 2 +- 4 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 linuxptp-aliasing.patch diff --git a/.gitignore b/.gitignore index 9834b0b..09b193a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /linuxptp-20120920git6ce135.tar.gz /linuxptp-20121109git4e8107.tar.gz /linuxptp-1.0.tgz +/linuxptp-1.1.tgz diff --git a/linuxptp-aliasing.patch b/linuxptp-aliasing.patch new file mode 100644 index 0000000..77bb56d --- /dev/null +++ b/linuxptp-aliasing.patch @@ -0,0 +1,19 @@ +--- a/phc2sys.c ++++ b/phc2sys.c +@@ -352,12 +352,14 @@ static int is_msg_mgt(struct ptp_message *msg) + + static int get_mgt_id(struct ptp_message *msg) + { +- return ((struct management_tlv *) msg->management.suffix)->id; ++ struct management_tlv *mgt = (struct management_tlv *) msg->management.suffix; ++ return mgt->id; + } + + static void *get_mgt_data(struct ptp_message *msg) + { +- return ((struct management_tlv *) msg->management.suffix)->data; ++ struct management_tlv *mgt = (struct management_tlv *) msg->management.suffix; ++ return mgt->data; + } + + static int run_pmc(int wait_sync, int *utc_offset) diff --git a/linuxptp.spec b/linuxptp.spec index f4719ae..13519dd 100644 --- a/linuxptp.spec +++ b/linuxptp.spec @@ -1,6 +1,6 @@ Name: linuxptp -Version: 1.0 -Release: 2%{?dist} +Version: 1.1 +Release: 1%{?dist} Summary: PTP implementation for Linux Group: System Environment/Base @@ -11,6 +11,8 @@ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tgz Source1: phc2sys.service Source2: ptp4l.service +Patch0: linuxptp-aliasing.patch + BuildRequires: systemd-units Requires(post): systemd-units @@ -26,6 +28,7 @@ Supporting legacy APIs and other platforms is not a goal. %prep %setup -q +%patch0 -p 1 -b .aliasing %build make %{?_smp_mflags} \ @@ -41,7 +44,7 @@ install -m 644 -p %{SOURCE1} %{SOURCE2} $RPM_BUILD_ROOT%{_unitdir} echo 'OPTIONS="-f /etc/ptp4l.conf -i eth0"' > \ $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ptp4l -echo 'OPTIONS="-d /dev/pps0"' > $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/phc2sys +echo 'OPTIONS="-w -i eth0"' > $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/phc2sys %post %if 0%{?systemd_post:1} diff --git a/sources b/sources index 4fa9f88..5b086e3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -fa13d387e0e76aaf10c61ff26c13abaa linuxptp-1.0.tgz +a04ed425dd4aaa458517f2d5fc9804cf linuxptp-1.1.tgz