Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1 | From 7ca9887f84adba065dc2e59b3de55ace2fc72ec0 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> |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 13 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 14 | --- |
| 15 | src/basic/missing_type.h | 20 ++++++++++++++++++++ |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 16 | src/shared/mount-setup.c | 1 + |
| 17 | 2 files changed, 21 insertions(+) |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 18 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 19 | --- a/src/basic/missing_type.h |
| 20 | +++ b/src/basic/missing_type.h |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame^] | 21 | @@ -19,3 +19,23 @@ typedef int (*comparison_fn_t)(const voi |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 22 | #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 Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 45 | --- 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 Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame^] | 55 | --- 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 | |