summaryrefslogtreecommitdiffstats
path: root/package/ltp-testsuite/0003-uClibc-ng-need-__UCLIBC_SV4_DEPRECATED__-enabled-for.patch
blob: 14f5888dedab86bb70eb6d422ab178115cd97011 (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
From bb966fd9efc3b9bec3ca72b0e72dd760434e0f10 Mon Sep 17 00:00:00 2001
From: Erico Nunes <nunes.erico@gmail.com>
Date: Fri, 30 Sep 2016 17:45:16 +0200
Subject: [PATCH] uClibc-ng need __UCLIBC_SV4_DEPRECATED__ enabled for ustat

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
[Erico: Rebase for ltp 20160920]
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
---
 testcases/kernel/syscalls/ustat/ustat01.c | 12 ++++++++++++
 testcases/kernel/syscalls/ustat/ustat02.c | 10 ++++++++++
 2 files changed, 22 insertions(+)

diff --git a/testcases/kernel/syscalls/ustat/ustat01.c b/testcases/kernel/syscalls/ustat/ustat01.c
index 494647b..35e0bb1 100644
--- a/testcases/kernel/syscalls/ustat/ustat01.c
+++ b/testcases/kernel/syscalls/ustat/ustat01.c
@@ -21,7 +21,9 @@
 
 #include <unistd.h>
 #include <errno.h>
+#if !defined(__UCLIBC__) || defined(__UCLIBC_SV4_DEPRECATED__)
 #include <sys/ustat.h>
+#endif
 #include <sys/types.h>
 #include <sys/stat.h>
 #include "test.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 @@ static void setup(void)
 
 	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 --git a/testcases/kernel/syscalls/ustat/ustat02.c b/testcases/kernel/syscalls/ustat/ustat02.c
index edada31..795c605 100644
--- a/testcases/kernel/syscalls/ustat/ustat02.c
+++ b/testcases/kernel/syscalls/ustat/ustat02.c
@@ -22,7 +22,9 @@
 
 #include <unistd.h>
 #include <errno.h>
+#if !defined(__UCLIBC__) || defined(__UCLIBC_SV4_DEPRECATED__)
 #include <sys/ustat.h>
+#endif
 #include <sys/stat.h>
 #include <sys/types.h>
 #include "test.h"
@@ -32,6 +34,8 @@ static void setup(void);
 
 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 @@ static void setup(void)
 
 	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
-- 
2.7.4

OpenPOWER on IntegriCloud