All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] read_all: Define FNM_EXTMATCH if not already (like under musl).
Date: Mon, 23 Jul 2018 15:01:46 +0200	[thread overview]
Message-ID: <20180723130146.GA2983@dell5510> (raw)
In-Reply-To: <1529939900-28259-1-git-send-email-daniel.diaz@linaro.org>

Hi Daniel,

> With musl, FNM_EXTMATCH is not defined:
> | read_all.c: In function 'read_test':
> | read_all.c:201:41: error: 'FNM_EXTMATCH' undeclared (first use in this function); did you mean 'FNM_NOMATCH'?
> |   if (exclude && !fnmatch(exclude, path, FNM_EXTMATCH)) {
> |                                          ^~~~~~~~~~~~
> |                                          FNM_NOMATCH
> | read_all.c:201:41: note: each undeclared identifier is reported only once for each function it appears in
> | <builtin>: recipe for target 'read_all' failed
> | make[4]: *** [read_all] Error 1

> Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
> ---
>  testcases/kernel/fs/read_all/read_all.c | 4 ++++
>  1 file changed, 4 insertions(+)

> diff --git a/testcases/kernel/fs/read_all/read_all.c b/testcases/kernel/fs/read_all/read_all.c
> index 42babae..f68217b 100644
> --- a/testcases/kernel/fs/read_all/read_all.c
> +++ b/testcases/kernel/fs/read_all/read_all.c
> @@ -60,6 +60,10 @@
>  #define MAX_PATH 4096
>  #define MAX_DISPLAY 40

> +#if !defined(FNM_EXTMATCH)
Maybe just
#ifndef FNM_EXTMATCH

And maybe it'd be good to put this definition into include/lapi/fnmatch.h
(create it), so it can be reused.

FYI: LTP isn't musl ready atm.

> +#define FNM_EXTMATCH 0
> +#endif
> +
>  struct queue {
>  	sem_t sem;
>  	int front;


Kind regards,
Petr

  reply	other threads:[~2018-07-23 13:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-25 15:18 [LTP] [PATCH] read_all: Define FNM_EXTMATCH if not already (like under musl) Daniel =?unknown-8bit?q?D=C3=ADaz?=
2018-07-23 13:01 ` Petr Vorel [this message]
2018-08-28 17:16   ` [LTP] [PATCH v2] fs/read_all: define FNM_EXTMATCH if needed Rafael David Tinoco
2018-08-30 15:31     ` Cyril Hrubis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180723130146.GA2983@dell5510 \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.