summaryrefslogtreecommitdiff
blob: 14498b494499df45757fc717f71ef2612e0325d3 (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
From ce1fb7978c836281dd91558f2b4ab3ecee0c253c Mon Sep 17 00:00:00 2001
From: Adrian Ratiu <adrian.ratiu@collabora.com>
Date: Wed, 10 Feb 2021 14:28:00 +0200
Subject: [PATCH] stress-ng.h: fix build-breaking HAVE_USTAT typo

This minor typo fails builds on newer glibc because ustat.h does
not exist anymore.

Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
---
Backported from stress-ng master commit ce1fb7978c836281d.
---
 core-shim.c | 3 ++-
 stress-ng.h | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/core-shim.c b/core-shim.c
index e4e6189d..8af7bcc5 100644
--- a/core-shim.c
+++ b/core-shim.c
@@ -1390,7 +1390,8 @@ int sys_clone3(struct shim_clone_args *cl_args, size_t size)
 
 int shim_ustat(dev_t dev, struct shim_ustat *ubuf)
 {
-#if defined(HAVE_USTAT)
+#if defined(HAVE_USTAT) &&	\
+     defined(HAVE_USTAT_H)
 	return ustat(dev, (void *)ubuf);
 #elif defined(__NR_ustat)
 	return syscall(__NR_ustat, dev, ubuf);
diff --git a/stress-ng.h b/stress-ng.h
index e16a08f0..9d964059 100644
--- a/stress-ng.h
+++ b/stress-ng.h
@@ -219,7 +219,7 @@
 #include <ucontext.h>
 #endif
 
-#if defined(HAVE_USTAT)
+#if defined(HAVE_USTAT_H)
 #include <ustat.h>
 #endif
 
-- 
2.30.0