Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame^] | 1 | From 45b78e3dc3edead4fc9883dd5a9877f473367bf7 Mon Sep 17 00:00:00 2001 |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 2 | From: Chen Qi <Qi.Chen@windriver.com> |
| 3 | Date: Mon, 25 Feb 2019 15:00:06 +0800 |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4 | Subject: [PATCH] add missing FTW_ macros for musl |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 5 | |
| 6 | This is to avoid build failures like below for musl. |
| 7 | |
| 8 | locale-util.c:296:24: error: 'FTW_STOP' undeclared |
| 9 | |
| 10 | Upstream-Status: Inappropriate [musl specific] |
| 11 | |
| 12 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> |
| 13 | --- |
| 14 | src/basic/missing_type.h | 20 ++++++++++++++++++++ |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame^] | 15 | src/shared/mount-setup.c | 1 + |
| 16 | 2 files changed, 21 insertions(+) |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 17 | |
| 18 | diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 19 | index aeaf6ad5ec..3df1084ef2 100644 |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 20 | --- a/src/basic/missing_type.h |
| 21 | +++ b/src/basic/missing_type.h |
| 22 | @@ -19,3 +19,23 @@ typedef int (*comparison_fn_t)(const void *, const void *); |
| 23 | #define __COMPAR_FN_T |
| 24 | typedef int (*__compar_fn_t)(const void *, const void *); |
| 25 | #endif |
| 26 | + |
| 27 | +#ifndef FTW_ACTIONRETVAL |
| 28 | +#define FTW_ACTIONRETVAL 16 |
| 29 | +#endif |
| 30 | + |
| 31 | +#ifndef FTW_CONTINUE |
| 32 | +#define FTW_CONTINUE 0 |
| 33 | +#endif |
| 34 | + |
| 35 | +#ifndef FTW_STOP |
| 36 | +#define FTW_STOP 1 |
| 37 | +#endif |
| 38 | + |
| 39 | +#ifndef FTW_SKIP_SUBTREE |
| 40 | +#define FTW_SKIP_SUBTREE 2 |
| 41 | +#endif |
| 42 | + |
| 43 | +#ifndef FTW_SKIP_SIBLINGS |
| 44 | +#define FTW_SKIP_SIBLINGS 3 |
| 45 | +#endif |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame^] | 46 | diff --git a/src/shared/mount-setup.c b/src/shared/mount-setup.c |
| 47 | index ef3527e9a7..c1cab40eb8 100644 |
| 48 | --- a/src/shared/mount-setup.c |
| 49 | +++ b/src/shared/mount-setup.c |
| 50 | @@ -32,6 +32,7 @@ |
| 51 | #include "strv.h" |
| 52 | #include "user-util.h" |
| 53 | #include "virt.h" |
| 54 | +#include "missing_type.h" |
| 55 | |
| 56 | typedef enum MountMode { |
| 57 | MNT_NONE = 0, |