aboutsummaryrefslogtreecommitdiffstats
path: root/meta-filesystems/recipes-utils/xfstests/xfstests/0001-add-missing-FTW_-macros-when-not-available-in-libc.patch
blob: 5e230e2cfb638f24ab23a6ff9e160ed75bf57274 (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
From 5facddc332c5ff8330f93c0a7e1b7f6d7bbd24a3 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 5 Nov 2023 08:31:21 -0800
Subject: [PATCH] add missing FTW_ macros when not available in libc

Fixes build with musl

| xfsfind.c:176:13: error: use of undeclared identifier 'FTW_STOP'
|   176 |                         retval = FTW_STOP;
|       |                                  ^

Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 src/global.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/global.h b/src/global.h
index 49570ef1..1c247488 100644
--- a/src/global.h
+++ b/src/global.h
@@ -190,4 +190,16 @@ roundup_64(unsigned long long x, unsigned int y)
 	return rounddown_64(x + y - 1, y);
 }
 
+#ifndef FTW_ACTIONRETVAL
+#define FTW_ACTIONRETVAL 16
+#endif
+
+#ifndef FTW_CONTINUE
+#define FTW_CONTINUE 0
+#endif
+
+#ifndef FTW_STOP
+#define FTW_STOP 1
+#endif
+
 #endif /* GLOBAL_H */
-- 
2.42.1