kumquat-buildroot/package/ltp-testsuite/0004-disable-ustat-on-uClibc.patch

71 lines
1.9 KiB
Diff
Raw Normal View History

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