blob: 57e18a58087736794f2a3f8ee8843981a8112b4f [file] [log] [blame]
Andrew Geissler595f6302022-01-24 19:11:47 +00001From 7ca9887f84adba065dc2e59b3de55ace2fc72ec0 Mon Sep 17 00:00:00 2001
Brad Bishop19323692019-04-05 15:28:33 -04002From: Chen Qi <Qi.Chen@windriver.com>
3Date: Mon, 25 Feb 2019 15:00:06 +0800
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004Subject: [PATCH] add missing FTW_ macros for musl
Brad Bishop19323692019-04-05 15:28:33 -04005
6This is to avoid build failures like below for musl.
7
8 locale-util.c:296:24: error: 'FTW_STOP' undeclared
9
10Upstream-Status: Inappropriate [musl specific]
11
12Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Andrew Geissler595f6302022-01-24 19:11:47 +000013
Brad Bishop19323692019-04-05 15:28:33 -040014---
15 src/basic/missing_type.h | 20 ++++++++++++++++++++
Andrew Geisslereff27472021-10-29 15:35:00 -050016 src/shared/mount-setup.c | 1 +
17 2 files changed, 21 insertions(+)
Brad Bishop19323692019-04-05 15:28:33 -040018
Brad Bishop19323692019-04-05 15:28:33 -040019--- a/src/basic/missing_type.h
20+++ b/src/basic/missing_type.h
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000021@@ -19,3 +19,23 @@ typedef int (*comparison_fn_t)(const voi
Brad Bishop19323692019-04-05 15:28:33 -040022 #define __COMPAR_FN_T
23 typedef int (*__compar_fn_t)(const void *, const void *);
24 #endif
25+
26+#ifndef FTW_ACTIONRETVAL
27+#define FTW_ACTIONRETVAL 16
28+#endif
29+
30+#ifndef FTW_CONTINUE
31+#define FTW_CONTINUE 0
32+#endif
33+
34+#ifndef FTW_STOP
35+#define FTW_STOP 1
36+#endif
37+
38+#ifndef FTW_SKIP_SUBTREE
39+#define FTW_SKIP_SUBTREE 2
40+#endif
41+
42+#ifndef FTW_SKIP_SIBLINGS
43+#define FTW_SKIP_SIBLINGS 3
44+#endif
Andrew Geisslereff27472021-10-29 15:35:00 -050045--- a/src/shared/mount-setup.c
46+++ b/src/shared/mount-setup.c
47@@ -32,6 +32,7 @@
48 #include "strv.h"
49 #include "user-util.h"
50 #include "virt.h"
51+#include "missing_type.h"
52
53 typedef enum MountMode {
54 MNT_NONE = 0,
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000055--- a/src/test/test-recurse-dir.c
56+++ b/src/test/test-recurse-dir.c
57@@ -6,6 +6,7 @@
58 #include "recurse-dir.h"
59 #include "strv.h"
60 #include "tests.h"
61+#include "missing_type.h"
62
63 static char **list_nftw = NULL;
64