aboutsummaryrefslogtreecommitdiff
path: root/package/ltp-testsuite/0004-disable-ustat-on-uClibc.patch
blob: 7a1f017169aa472e0eab1091ec9311f7f5b8ac9f (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
uClibc-ng need __UCLIBC_SV4_DEPRECATED__ enabled for ustat

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>

diff -Nur ltp-full-20160126.orig/testcases/kernel/syscalls/ustat/ustat01.c ltp-full-20160126/testcases/kernel/syscalls/ustat/ustat01.c
--- ltp-full-20160126.orig/testcases/kernel/syscalls/ustat/ustat01.c	2016-01-26 13:35:25.000000000 +0100
+++ ltp-full-20160126/testcases/kernel/syscalls/ustat/ustat01.c	2016-03-05 01:15:39.492789841 +0100
@@ -20,7 +20,9 @@
  */
 
 #include <unistd.h>
+#if !defined(__UCLIBC__) || defined(__UCLIBC_SV4_DEPRECATED__)
 #include <ustat.h>
+#endif
 #include <errno.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -30,6 +32,9 @@
 static void setup(void);
 
 char *TCID = "ustat01";
+
+#if !defined(__UCLIBC__) || defined(__UCLIBC_SV4_DEPRECATED__)
+
 int TST_TOTAL = 1;
 
 static dev_t dev_num;
@@ -79,3 +84,10 @@
 
 	dev_num = buf.st_dev;
 }
+#else /* systems that dont support ustat */
+int main(void)
+{
+        tst_brkm(TCONF, NULL, "system doesn't have ustat support");
+}
+#endif
+
diff -Nur ltp-full-20160126.orig/testcases/kernel/syscalls/ustat/ustat02.c ltp-full-20160126/testcases/kernel/syscalls/ustat/ustat02.c
--- ltp-full-20160126.orig/testcases/kernel/syscalls/ustat/ustat02.c	2016-01-26 13:35:25.000000000 +0100
+++ ltp-full-20160126/testcases/kernel/syscalls/ustat/ustat02.c	2016-03-05 01:15:55.677411889 +0100
@@ -21,7 +21,9 @@
  */
 
 #include <unistd.h>
+#if !defined(__UCLIBC__) || defined(__UCLIBC_SV4_DEPRECATED__)
 #include <ustat.h>
+#endif
 #include <errno.h>
 #include <sys/stat.h>
 #include <sys/types.h>
@@ -32,6 +34,8 @@
 
 char *TCID = "ustat02";
 
+#if !defined(__UCLIBC__) || defined(__UCLIBC_SV4_DEPRECATED__)
+
 static dev_t invalid_dev = -1;
 static dev_t root_dev;
 struct ustat ubuf;
@@ -101,3 +105,9 @@
 
 	root_dev = buf.st_dev;
 }
+#else /* systems that dont support ustat */
+int main(void)
+{
+        tst_brkm(TCONF, NULL, "system doesn't have ustat support");
+}
+#endif