kumquat-buildroot/package/ltp-testsuite/0003-uClibc-ng-need-__UCLIBC_SV4_DEPRECATED__-enabled-for.patch
Erico Nunes 5eab4215ca ltp-testsuite: bump to version 20160920
Patch 0001-fix-uClibc-build.patch is now part of upstream so it is not
needed in Buildroot anymore. The remaining patches were just rebased and
then renumbered so that they apply cleanly to this new version.

This has been build-tested with both glibc and uClibc toolchains and
run-tested on x86_64 and aarch64.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-10-03 23:26:35 +02:00

85 lines
2.2 KiB
Diff

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