summaryrefslogtreecommitdiffstats
path: root/package/rt-tests/rt-tests-uclibc.patch
blob: b8e1ac5a2f2250a1b1556dce8854c7c46924c48f (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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
[PATCH] fix build with uClibc

Fix two build issues with (modern) uClibc:
- uClibc has clock_nanosleep() if built with UCLIBC_HAS_ADVANCED_REALTIME,
  conflicting with emulation function
- uClibc doesn't provide utmpx.h if not built with UCLIBC_HAS_UTMPX, which
  is included in several files (but not needed).

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 src/backfire/sendme.c         |    1 -
 src/cyclictest/cyclictest.c   |    3 ++-
 src/pmqtest/pmqtest.c         |    1 -
 src/ptsematest/ptsematest.c   |    1 -
 src/sigwaittest/sigwaittest.c |    2 --
 src/svsematest/svsematest.c   |    1 -
 6 files changed, 2 insertions(+), 7 deletions(-)

Index: rt-tests-0.83/src/backfire/sendme.c
===================================================================
--- rt-tests-0.83.orig/src/backfire/sendme.c
+++ rt-tests-0.83/src/backfire/sendme.c
@@ -32,7 +32,6 @@
 #include "rt-utils.h"
 #include "rt-get_cpu.h"
 
-#include <utmpx.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/time.h>
Index: rt-tests-0.83/src/cyclictest/cyclictest.c
===================================================================
--- rt-tests-0.83.orig/src/cyclictest/cyclictest.c
+++ rt-tests-0.83/src/cyclictest/cyclictest.c
@@ -23,6 +23,7 @@
 #include <string.h>
 #include <time.h>
 #include <errno.h>
+#include <features.h>
 #include <limits.h>
 #include <linux/unistd.h>
 
@@ -53,7 +54,7 @@
 #define gettid() syscall(__NR_gettid)
 #define sigev_notify_thread_id _sigev_un._tid
 
-#ifdef __UCLIBC__
+#if defined(__UCLIBC__) && !defined(__UCLIBC_HAS_ADVANCED_REALTIME__)
 #define MAKE_PROCESS_CPUCLOCK(pid, clock) \
 	((~(clockid_t) (pid) << 3) | (clockid_t) (clock))
 #define CPUCLOCK_SCHED          2
Index: rt-tests-0.83/src/pmqtest/pmqtest.c
===================================================================
--- rt-tests-0.83.orig/src/pmqtest/pmqtest.c
+++ rt-tests-0.83/src/pmqtest/pmqtest.c
@@ -33,7 +33,6 @@
 #include <sys/time.h>
 #include <sys/mman.h>
 #include <linux/unistd.h>
-#include <utmpx.h>
 #include <mqueue.h>
 #include "rt-utils.h"
 #include "rt-get_cpu.h"
Index: rt-tests-0.83/src/ptsematest/ptsematest.c
===================================================================
--- rt-tests-0.83.orig/src/ptsematest/ptsematest.c
+++ rt-tests-0.83/src/ptsematest/ptsematest.c
@@ -33,7 +33,6 @@
 #include <sys/time.h>
 #include <sys/mman.h>
 #include <linux/unistd.h>
-#include <utmpx.h>
 #include "rt-utils.h"
 #include "rt-get_cpu.h"
 
Index: rt-tests-0.83/src/sigwaittest/sigwaittest.c
===================================================================
--- rt-tests-0.83.orig/src/sigwaittest/sigwaittest.c
+++ rt-tests-0.83/src/sigwaittest/sigwaittest.c
@@ -31,11 +31,9 @@
 #include <signal.h>
 #include <string.h>
 #include <time.h>
-#include <utmpx.h>
 #include <sys/types.h>
 #include <sys/time.h>
 #include <linux/unistd.h>
-#include <utmpx.h>
 #include "rt-utils.h"
 #include "rt-get_cpu.h"
 
Index: rt-tests-0.83/src/svsematest/svsematest.c
===================================================================
--- rt-tests-0.83.orig/src/svsematest/svsematest.c
+++ rt-tests-0.83/src/svsematest/svsematest.c
@@ -31,7 +31,6 @@
 #include <sched.h>
 #include <string.h>
 #include <time.h>
-#include <utmpx.h>
 
 #include <linux/unistd.h>