1 From bb966fd9efc3b9bec3ca72b0e72dd760434e0f10 Mon Sep 17 00:00:00 2001
2 From: Erico Nunes <nunes.erico@gmail.com>
3 Date: Fri, 30 Sep 2016 17:45:16 +0200
4 Subject: [PATCH] uClibc-ng need __UCLIBC_SV4_DEPRECATED__ enabled for ustat
6 Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
7 [Erico: Rebase for ltp 20160920]
8 Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
10 testcases/kernel/syscalls/ustat/ustat01.c | 12 ++++++++++++
11 testcases/kernel/syscalls/ustat/ustat02.c | 10 ++++++++++
12 2 files changed, 22 insertions(+)
14 diff --git a/testcases/kernel/syscalls/ustat/ustat01.c b/testcases/kernel/syscalls/ustat/ustat01.c
15 index 494647b..35e0bb1 100644
16 --- a/testcases/kernel/syscalls/ustat/ustat01.c
17 +++ b/testcases/kernel/syscalls/ustat/ustat01.c
22 +#if !defined(__UCLIBC__) || defined(__UCLIBC_SV4_DEPRECATED__)
23 #include <sys/ustat.h>
25 #include <sys/types.h>
29 static void setup(void);
31 char *TCID = "ustat01";
33 +#if !defined(__UCLIBC__) || defined(__UCLIBC_SV4_DEPRECATED__)
38 @@ -79,3 +84,10 @@ static void setup(void)
42 +#else /* systems that dont support ustat */
45 + tst_brkm(TCONF, NULL, "system doesn't have ustat support");
49 diff --git a/testcases/kernel/syscalls/ustat/ustat02.c b/testcases/kernel/syscalls/ustat/ustat02.c
50 index edada31..795c605 100644
51 --- a/testcases/kernel/syscalls/ustat/ustat02.c
52 +++ b/testcases/kernel/syscalls/ustat/ustat02.c
57 +#if !defined(__UCLIBC__) || defined(__UCLIBC_SV4_DEPRECATED__)
58 #include <sys/ustat.h>
61 #include <sys/types.h>
63 @@ -32,6 +34,8 @@ static void setup(void);
65 char *TCID = "ustat02";
67 +#if !defined(__UCLIBC__) || defined(__UCLIBC_SV4_DEPRECATED__)
69 static dev_t invalid_dev = -1;
70 static dev_t root_dev;
72 @@ -101,3 +105,9 @@ static void setup(void)
74 root_dev = buf.st_dev;
76 +#else /* systems that dont support ustat */
79 + tst_brkm(TCONF, NULL, "system doesn't have ustat support");