fix building with new kernel headers
This commit is contained in:
parent
4961f44fe5
commit
3d158ecbea
51
linuxptp-headers.patch
Normal file
51
linuxptp-headers.patch
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
commit 8ac29acbbed6453baff7dc236ee72d240d5d6d91
|
||||||
|
Author: Miroslav Lichvar <mlichvar@redhat.com>
|
||||||
|
Date: Tue Nov 13 12:54:36 2018 +0100
|
||||||
|
|
||||||
|
Fix building with new kernel headers.
|
||||||
|
|
||||||
|
net_tstamp.h in recent kernel versions requires time.h for clockid_t.
|
||||||
|
|
||||||
|
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
|
||||||
|
|
||||||
|
diff --git a/clock.c b/clock.c
|
||||||
|
index 56bc79b..ef9a008 100644
|
||||||
|
--- a/clock.c
|
||||||
|
+++ b/clock.c
|
||||||
|
@@ -17,11 +17,11 @@
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*/
|
||||||
|
#include <errno.h>
|
||||||
|
+#include <time.h>
|
||||||
|
#include <linux/net_tstamp.h>
|
||||||
|
#include <poll.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
-#include <time.h>
|
||||||
|
#include <sys/queue.h>
|
||||||
|
|
||||||
|
#include "address.h"
|
||||||
|
diff --git a/sk.c b/sk.c
|
||||||
|
index e2b1f28..30162eb 100644
|
||||||
|
--- a/sk.c
|
||||||
|
+++ b/sk.c
|
||||||
|
@@ -18,6 +18,7 @@
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*/
|
||||||
|
#include <errno.h>
|
||||||
|
+#include <time.h>
|
||||||
|
#include <linux/net_tstamp.h>
|
||||||
|
#include <linux/sockios.h>
|
||||||
|
#include <linux/ethtool.h>
|
||||||
|
diff --git a/timemaster.c b/timemaster.c
|
||||||
|
index 058678f..00db59f 100644
|
||||||
|
--- a/timemaster.c
|
||||||
|
+++ b/timemaster.c
|
||||||
|
@@ -22,6 +22,7 @@
|
||||||
|
#include <errno.h>
|
||||||
|
#include <libgen.h>
|
||||||
|
#include <limits.h>
|
||||||
|
+#include <time.h>
|
||||||
|
#include <linux/net_tstamp.h>
|
||||||
|
#include <net/if.h>
|
||||||
|
#include <signal.h>
|
@ -20,6 +20,7 @@ Source4: timemaster.conf
|
|||||||
Source10: https://github.com/mlichvar/linuxptp-testsuite/archive/%{testsuite_ver}/linuxptp-testsuite-%{testsuite_ver}.tar.gz
|
Source10: https://github.com/mlichvar/linuxptp-testsuite/archive/%{testsuite_ver}/linuxptp-testsuite-%{testsuite_ver}.tar.gz
|
||||||
# simulator for test suite
|
# simulator for test suite
|
||||||
Source11: https://github.com/mlichvar/clknetsim/archive/%{clknetsim_ver}/clknetsim-%{clknetsim_ver}.tar.gz
|
Source11: https://github.com/mlichvar/clknetsim/archive/%{clknetsim_ver}/clknetsim-%{clknetsim_ver}.tar.gz
|
||||||
|
Patch1: linuxptp-headers.patch
|
||||||
|
|
||||||
BuildRequires: gcc gcc-c++ systemd
|
BuildRequires: gcc gcc-c++ systemd
|
||||||
|
|
||||||
@ -34,6 +35,7 @@ Supporting legacy APIs and other platforms is not a goal.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -a 10 -a 11 -n %{name}-%{!?gitfullver:%{version}}%{?gitfullver}
|
%setup -q -a 10 -a 11 -n %{name}-%{!?gitfullver:%{version}}%{?gitfullver}
|
||||||
|
%patch1 -p1 -b .headers
|
||||||
mv linuxptp-testsuite-%{testsuite_ver}* testsuite
|
mv linuxptp-testsuite-%{testsuite_ver}* testsuite
|
||||||
mv clknetsim-%{clknetsim_ver}* testsuite/clknetsim
|
mv clknetsim-%{clknetsim_ver}* testsuite/clknetsim
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user