Files
LibreELEC.tv/packages/addons/addon-depends/system-tools-depends/stress-ng/patches/stress-ng-0002-only-use-ustat-if-HAVE_USTAT-is-defined.patch
2018-08-05 18:53:08 +01:00

49 lines
1.2 KiB
Diff

From 04322c0d653aec755517f771e6e400fc14cf611c Mon Sep 17 00:00:00 2001
From: Colin Ian King <colin.king@canonical.com>
Date: Sat, 4 Aug 2018 07:11:58 +0100
Subject: stress-sysbadaddr: only use ustat if HAVE_USTAT is defined
We should be using HAVE_USTAT as ustat.h is not available on
newer versions of glibc and HAVE_USTAT is undefined if this
is not available.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
stress-sysbadaddr.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/stress-sysbadaddr.c b/stress-sysbadaddr.c
index eab9213..0b6465f 100644
--- a/stress-sysbadaddr.c
+++ b/stress-sysbadaddr.c
@@ -28,7 +28,7 @@
#include <sys/sysinfo.h>
#include <utime.h>
#include <sys/vfs.h>
-#if defined(__NR_ustat)
+#if defined(HAVE_USTAT)
#include <ustat.h>
#endif
#endif
@@ -379,7 +379,7 @@ static int bad_times(void *addr)
return times(addr);
}
-#if defined(__linux__) && defined(__NR_ustat)
+#if defined(HAVE_USTAT)
static int bad_ustat(void *addr)
{
dev_t dev = { 0 };
@@ -495,7 +495,7 @@ static bad_syscall_t bad_syscalls[] = {
bad_timer_create,
#endif
bad_times,
-#if defined(__linux__) && defined(__NR_ustat)
+#if defined(HAVE_USTAT)
bad_ustat,
#endif
#if defined(__linux__)
--
cgit v0.11.2