blob: c613581ef963f9dcddcf4f53c937bc08efe6c6d7 [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
19diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h
Andrew Geisslerd1e89492021-02-12 15:35:20 -060020index aeaf6ad5ec..3df1084ef2 100644
Brad Bishop19323692019-04-05 15:28:33 -040021--- a/src/basic/missing_type.h
22+++ b/src/basic/missing_type.h
23@@ -19,3 +19,23 @@ typedef int (*comparison_fn_t)(const void *, const void *);
24 #define __COMPAR_FN_T
25 typedef int (*__compar_fn_t)(const void *, const void *);
26 #endif
27+
28+#ifndef FTW_ACTIONRETVAL
29+#define FTW_ACTIONRETVAL 16
30+#endif
31+
32+#ifndef FTW_CONTINUE
33+#define FTW_CONTINUE 0
34+#endif
35+
36+#ifndef FTW_STOP
37+#define FTW_STOP 1
38+#endif
39+
40+#ifndef FTW_SKIP_SUBTREE
41+#define FTW_SKIP_SUBTREE 2
42+#endif
43+
44+#ifndef FTW_SKIP_SIBLINGS
45+#define FTW_SKIP_SIBLINGS 3
46+#endif
Andrew Geisslereff27472021-10-29 15:35:00 -050047diff --git a/src/shared/mount-setup.c b/src/shared/mount-setup.c
48index ef3527e9a7..c1cab40eb8 100644
49--- a/src/shared/mount-setup.c
50+++ b/src/shared/mount-setup.c
51@@ -32,6 +32,7 @@
52 #include "strv.h"
53 #include "user-util.h"
54 #include "virt.h"
55+#include "missing_type.h"
56
57 typedef enum MountMode {
58 MNT_NONE = 0,