summaryrefslogtreecommitdiffstats
path: root/patches/linuxptp-2.0/0001-Fix-building-with-new-kernel-headers.patch
blob: 247a6a353a7d42b3b6de99e9e22f8b8e87f67776 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
From: Miroslav Lichvar <mlichvar@redhat.com>
Date: Thu, 6 Dec 2018 18:23:44 +0100
Subject: [PATCH] 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>
---
 clock.c      | 2 +-
 sk.c         | 1 +
 timemaster.c | 1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/clock.c b/clock.c
index faf2dea82a5b..9bbcefa5c57c 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 f18b2bf8732b..386b4c8adf80 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 4ba921edb902..28c215a2de95 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>