blob: d1191d7e8efa54c076ba1342bc4dc3a88ac903bc [file] [log] [blame]
Andrew Geisslerd5838332022-05-27 11:33:10 -05001From a0450f7909348e7ff1d58adc0aee4119a0519c1f 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---
Andrew Geissler615f2f12022-07-15 14:00:58 -050015 src/basic/missing_type.h | 4 ++++
16 src/test/test-recurse-dir.c | 1 +
17 2 files changed, 5 insertions(+)
Brad Bishop19323692019-04-05 15:28:33 -040018
Andrew Geisslerd5838332022-05-27 11:33:10 -050019diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h
Andrew Geissler615f2f12022-07-15 14:00:58 -050020index 6c0456349d..73a5b90e3c 100644
Brad Bishop19323692019-04-05 15:28:33 -040021--- a/src/basic/missing_type.h
22+++ b/src/basic/missing_type.h
Andrew Geissler615f2f12022-07-15 14:00:58 -050023@@ -14,3 +14,7 @@
24 #ifndef __GLIBC__
25 typedef int (*comparison_fn_t)(const void *, const void *);
Brad Bishop19323692019-04-05 15:28:33 -040026 #endif
27+
Brad Bishop19323692019-04-05 15:28:33 -040028+#ifndef FTW_CONTINUE
29+#define FTW_CONTINUE 0
30+#endif
Andrew Geisslerd5838332022-05-27 11:33:10 -050031diff --git a/src/test/test-recurse-dir.c b/src/test/test-recurse-dir.c
32index 2c2120b136..bc60a178a2 100644
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000033--- a/src/test/test-recurse-dir.c
34+++ b/src/test/test-recurse-dir.c
35@@ -6,6 +6,7 @@
36 #include "recurse-dir.h"
37 #include "strv.h"
38 #include "tests.h"
39+#include "missing_type.h"
40
41 static char **list_nftw = NULL;
42