From patchwork Tue Aug 28 17:16:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Rafael David Tinoco X-Patchwork-Id: 145350 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp1434371ljw; Tue, 28 Aug 2018 10:17:05 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYCUy4iM23SMtxKS5U7WywJSRzUP1H3/Q/4japc7idPrXHwuiqpLY69vGl6zVc6Jgv2IAIj X-Received: by 2002:a1c:e00a:: with SMTP id x10-v6mr2001831wmg.58.1535476625160; Tue, 28 Aug 2018 10:17:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535476625; cv=none; d=google.com; s=arc-20160816; b=VDV+X4I9kcZ1zYGjmgzgorcVSidUKC3ZNPIKK+LjEkf6Q7ENLiaS55lcvQBaBtgHrB c4UykUg141Ry9ZB7Z9dkrPJx8VRazDo0qezjREHNUaC2Bz0JEobf4G1ifCTL6Buo1I+4 dQs0wv615CSrIox820sEwYDvCDwiOWD5aujFSdAvn2g03RV2rchhqR3GlSnbrXX3z/xe oIrSmNtoPt+k/JQgpJ3KgWKobM8puA6+oXtXAIrWrwkTgp4d9iNItsKnLPViiqvzpdBq /sedqU0lBPD6+/C61Gp/WaXCUvS+NyVSdUzUdHm5ZOQTKIChRCGNaMdoUTOt6ZCj2cA4 KGIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :cc:mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=Gpi3bUQ/U0nOh9Ptm8QE0t8k2NnAuOiK2ZNdPCiJKUc=; b=LjStdraEiyqmz5LBkh4FRRv4CNXP/tBiNrR952nB0vqxbrU9d6ZAAqHl3eMo3hqHb1 1PMPHkzWKLSOkXCqBYqzGhaZ1tKWXJLj8t2mW/r6ZSV6YAUp/Fbw4XS08EOaIfSED8Fy 5E90hgmOjGjuJn/8ZXHjTogpwlYCNhl1PMWEaiQM4KJhBI8EJ6iIrkT/rxaFiHpZq1fZ OhCvtBTwmGK0PCfVzQ72J6NrCuTMyN2ekSklIDWoBGamrO+oU2cuX7rPFzt49GxU1Ifh CpojwKv6CLvrdZVXIVt5Tgt3JjHIlzvIDmg+Dgc0mnaqzMYgMYEY/tNQ6WGr0BA3uKxs Au1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=DTp0EwDa; spf=pass (google.com: domain of ltp-bounces+patch=linaro.org@lists.linux.it designates 2001:1418:10:5::2 as permitted sender) smtp.mailfrom="ltp-bounces+patch=linaro.org@lists.linux.it"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from picard.linux.it (picard.linux.it. [2001:1418:10:5::2]) by mx.google.com with ESMTPS id 10-v6si1478456wme.112.2018.08.28.10.17.05 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Aug 2018 10:17:05 -0700 (PDT) Received-SPF: pass (google.com: domain of ltp-bounces+patch=linaro.org@lists.linux.it designates 2001:1418:10:5::2 as permitted sender) client-ip=2001:1418:10:5::2; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=DTp0EwDa; spf=pass (google.com: domain of ltp-bounces+patch=linaro.org@lists.linux.it designates 2001:1418:10:5::2 as permitted sender) smtp.mailfrom="ltp-bounces+patch=linaro.org@lists.linux.it"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id BAA883E7228 for ; Tue, 28 Aug 2018 19:17:04 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-2.smtp.seeweb.it (in-2.smtp.seeweb.it [IPv6:2001:4b78:1:20::2]) by picard.linux.it (Postfix) with ESMTP id AF2513E6240 for ; Tue, 28 Aug 2018 19:17:00 +0200 (CEST) Received: from mail-qt0-x241.google.com (mail-qt0-x241.google.com [IPv6:2607:f8b0:400d:c0d::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by in-2.smtp.seeweb.it (Postfix) with ESMTPS id C907560086C for ; Tue, 28 Aug 2018 19:16:59 +0200 (CEST) Received: by mail-qt0-x241.google.com with SMTP id j7-v6so2594322qtp.2 for ; Tue, 28 Aug 2018 10:16:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CrnCUSeCAo96GoUeyS0QBJ1UDYqcm/tn9dhseiBMdCc=; b=DTp0EwDaRqzwFPJcvEngzpb7EasGsyTQP3+fFSlSuoj85jL0rGGJGnvE2YcITTRlTK s3NGGz6vZICfoub9NPm5uB5Uop7ALO7efkDoXS7VDNhJlcG/wpzWq+nyFdUnmFB7Wb4I VD/fnDLPob5XqZHy5TNh9WHlPlh5ByFBvQldQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CrnCUSeCAo96GoUeyS0QBJ1UDYqcm/tn9dhseiBMdCc=; b=KW2mWAPQYzGUudzwNKfXhhX2qvY22gnZub75rFe6ABeBROYV4o+a56C0d3vuiaOHfn lFb7hDdFkdYypCXDI38PYxhNutxJWJdzfkk+VK1fPJCCsfaJMC4IZ5MceYsPuojoKwDI I827NiCBAh+NbXe/Mfqccw3MXmMw4RQfRJgtyxqh7kUmahC+sDDo0vHmUNaFKq/qq+9f mHhHSxLLZey1svA/9aOlYlV3tQVtDL3lCMYi0FMeyB/q8oFUblcJYnrSt7VEiQTTMnP3 h4nIdXsRMJQzcmfJbPbwBMJIm10bzvUlmTk9qRgVcKvkBQEOM8OuwINxExx+WKrS1oP7 /koQ== X-Gm-Message-State: APzg51DEGGkiXCbH8bTbJfKKj2LkpR6zp3dNCnaJ0Mipjbt46nMW8nxz DffJJxKOGnLM2nDIyphIB7XDp2BiMrzDSw== X-Received: by 2002:aed:2499:: with SMTP id t25-v6mr2800986qtc.131.1535476618365; Tue, 28 Aug 2018 10:16:58 -0700 (PDT) Received: from workstation.celeiro.br ([168.194.163.45]) by smtp.gmail.com with ESMTPSA id a187-v6sm860616qkd.47.2018.08.28.10.16.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Aug 2018 10:16:57 -0700 (PDT) From: Rafael David Tinoco To: ltp@lists.linux.it Date: Tue, 28 Aug 2018 14:16:54 -0300 Message-Id: <20180828171654.532-1-rafael.tinoco@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180723130146.GA2983@dell5510> References: <20180723130146.GA2983@dell5510> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at in-2.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-2.smtp.seeweb.it Cc: daniel.diaz@linaro.org, rafael.tinoco@linaro.org Subject: [LTP] [PATCH v2] fs/read_all: define FNM_EXTMATCH if needed X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+patch=linaro.org@lists.linux.it Sender: "ltp" FNM_EXTMATCH is not defined in musl libc: | 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 | : recipe for target 'read_all' failed | make[4]: *** [read_all] Error 1 Even not being 100% musl ready at the moment, this seems a trivial fix to allow LTP to be built with musl libc. Signed-off-by: Daniel Díaz Signed-off-by: Rafael David Tinoco Tested-by: Daniel Díaz --- include/lapi/fnmatch.h | 14 ++++++++++++++ testcases/kernel/fs/read_all/read_all.c | 1 + 2 files changed, 15 insertions(+) create mode 100644 include/lapi/fnmatch.h diff --git a/include/lapi/fnmatch.h b/include/lapi/fnmatch.h new file mode 100644 index 000000000..9628ac440 --- /dev/null +++ b/include/lapi/fnmatch.h @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Copyright (c) 2018 Linaro Limited. All rights reserved. + * Author: Rafael David Tinoco + */ + +#ifndef FNMATCH_H__ +#define FNMATCH_H__ + +#ifndef FNM_EXTMATCH +#define FNM_EXTMATCH 0 +#endif + +#endif diff --git a/testcases/kernel/fs/read_all/read_all.c b/testcases/kernel/fs/read_all/read_all.c index ac463dba9..1f0b315a1 100644 --- a/testcases/kernel/fs/read_all/read_all.c +++ b/testcases/kernel/fs/read_all/read_all.c @@ -40,6 +40,7 @@ */ #include #include +#include #include #include #include