Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | From 23518508de307790231d16af307291f1b45e903a Mon Sep 17 00:00:00 2001 |
| 2 | From: =?UTF-8?q?Daniel=20D=C3=ADaz?= <daniel.diaz@linaro.org> |
| 3 | Date: Tue, 5 Jun 2018 15:36:30 -0500 |
| 4 | Subject: [PATCH] read_all: Define FNM_EXTMATCH if not already (like under |
| 5 | musl). |
| 6 | MIME-Version: 1.0 |
| 7 | Content-Type: text/plain; charset=UTF-8 |
| 8 | Content-Transfer-Encoding: 8bit |
| 9 | |
| 10 | With musl, FNM_EXTMATCH is not defined: |
| 11 | | read_all.c: In function 'read_test': |
| 12 | | read_all.c:201:41: error: 'FNM_EXTMATCH' undeclared (first use in this function); did you mean 'FNM_NOMATCH'? |
| 13 | | if (exclude && !fnmatch(exclude, path, FNM_EXTMATCH)) { |
| 14 | | ^~~~~~~~~~~~ |
| 15 | | FNM_NOMATCH |
| 16 | | read_all.c:201:41: note: each undeclared identifier is reported only once for each function it appears in |
| 17 | | <builtin>: recipe for target 'read_all' failed |
| 18 | | make[4]: *** [read_all] Error 1 |
| 19 | |
| 20 | Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org> |
| 21 | |
| 22 | Upstream-Status: Pending |
| 23 | --- |
| 24 | testcases/kernel/fs/read_all/read_all.c | 4 ++++ |
| 25 | 1 file changed, 4 insertions(+) |
| 26 | |
| 27 | diff --git a/testcases/kernel/fs/read_all/read_all.c b/testcases/kernel/fs/read_all/read_all.c |
| 28 | index a8e1611..e9ff47a 100644 |
| 29 | --- a/testcases/kernel/fs/read_all/read_all.c |
| 30 | +++ b/testcases/kernel/fs/read_all/read_all.c |
| 31 | @@ -59,6 +59,10 @@ |
| 32 | #define MAX_PATH 4096 |
| 33 | #define MAX_DISPLAY 40 |
| 34 | |
| 35 | +#if !defined(FNM_EXTMATCH) |
| 36 | +#define FNM_EXTMATCH 0 |
| 37 | +#endif |
| 38 | + |
| 39 | struct queue { |
| 40 | sem_t sem; |
| 41 | int front; |
| 42 | -- |
| 43 | 2.7.4 |
| 44 | |