aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/ptpd/ptpd-1.0.0/add-limit-h.patch
blob: 8ed3f2f977390565d3d189fac32a571f35c45a61 (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
ptpd: fix ftbfs by including limits.h so MAX_INT defined

The current recipe for ptpd fails to build with:

| arith.c: In function 'fromInternalTime':
| arith.c:46: error: 'INT_MAX' undeclared (first use in this function)
| arith.c:46: error: (Each undeclared identifier is reported only once
| arith.c:46: error: for each function it appears in.)
| arith.c: In function 'toInternalTime':
| arith.c:64: error: 'INT_MAX' undeclared (first use in this function)
| make: *** [arith.o] Error 1
| make: *** Waiting for unfinished jobs....
| FATAL: oe_runmake failed

diff --git a/src/arith.c b/src/arith.c
--- a/src/arith.c
+++ b/src/arith.c
@@ -1,6 +1,7 @@
 /* arith.c */
 
 #include "ptpd.h"
+#include <limits.h>
 
 /* from annex C of the spec */
 UInteger32 crc_algorithm(Octet *buf, Integer16 length)