From patchwork Wed Aug 17 00:18:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Omar Sandoval X-Patchwork-Id: 9285009 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9A22B607FD for ; Wed, 17 Aug 2016 00:18:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8ADF428794 for ; Wed, 17 Aug 2016 00:18:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7F241288A2; Wed, 17 Aug 2016 00:18:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D3A3528794 for ; Wed, 17 Aug 2016 00:18:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752224AbcHQASf (ORCPT ); Tue, 16 Aug 2016 20:18:35 -0400 Received: from mail-pf0-f170.google.com ([209.85.192.170]:33552 "EHLO mail-pf0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752152AbcHQASe (ORCPT ); Tue, 16 Aug 2016 20:18:34 -0400 Received: by mail-pf0-f170.google.com with SMTP id y134so32220824pfg.0 for ; Tue, 16 Aug 2016 17:18:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osandov-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=G9YkW8juKpWgvEaPg0h1ozxUN/fSAdo3guLy/ZijXSE=; b=t5crm1SUw1QO1uxky05gI2SKX3CBT7UMA9CRQDwwesMg7PWUQyXJQxnrwZ5uRdPjE4 rOsWBNf2915jlJQUFgU2kKxdXhIqLP1dG9XzCicxEqZlC2lJ6kmbwAMF0g4Z8Fio7XFW JfaktO4ZJ9Yxpn+cHL6LHdTX6alMnAgtVDclzm2ojiqF4oWyb+M8jB9yc1U3FtqNO9ic rCho/aH7PMevYk1Sktp56lfOehxY/TuOZ3Q2gYUAiB65jJ+bawnZCPLAW0jp/pz5AHGa 9wNKtqqMEXpuA73XuyHiE/UzO2BcdpbSX3c9oQHOsZv6Cag0/K6Ta/SKQJSY8BlDSeT7 iejA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=G9YkW8juKpWgvEaPg0h1ozxUN/fSAdo3guLy/ZijXSE=; b=deqZB1WS4sLfZJQqDG8hzkKwimRPDUmdnG/OeuPRfrO4XeIjNIPd0E1XDU6HnirFFK f9nbgqQWTmCJIL3hefptTDiLlKRKvU4q/JRKu7AjLgZHdnFyC7Wlo2UvB+PQ50L8P4iB PJkiKbjgXBlwiqg5qm96L5ejuZKGvEvoxspf8hxCtglqK6Et/dGGE8WKYJt2PBh3dOQm NPyY9QwI8eR1LVdq7VZBjIOT180DY5ZMWJbbYY81j5aGNyfB3EY/82AWZJx35H6JoiVa XwqNcpO2NGhx6UVMS66sX6cmXqubLlhi2/Uzg6KgcUGX6HP3r5t9/XfBw+kgzDqWreZ3 NCFg== X-Gm-Message-State: AEkoouvnYCrCH2e/IA90GUKmhXQVwELHR8aVItIvdluU74mmZIfpciYBrrF7Z8lAtUlv5I0G X-Received: by 10.98.204.74 with SMTP id a71mr69401896pfg.149.1471393114019; Tue, 16 Aug 2016 17:18:34 -0700 (PDT) Received: from vader.thefacebook.com ([2620:10d:c090:200::8:4ac9]) by smtp.gmail.com with ESMTPSA id sy7sm42114405pac.42.2016.08.16.17.18.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Aug 2016 17:18:33 -0700 (PDT) From: Omar Sandoval To: fstests@vger.kernel.org Cc: Eric Sandeen , kernel-team@fb.com Subject: [PATCH] test-nextquota: fix build failure with glibc 2.24 Date: Tue, 16 Aug 2016 17:18:28 -0700 Message-Id: <89c2bd786fc4be75edb99132a1e404bc3923079a.1471392905.git.osandov@fb.com> X-Mailer: git-send-email 2.9.3 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Omar Sandoval glibc 2.24 defines Q_GETNEXTQUOTA but not `struct nextdqblk`. We need to define it ourselves, but let's give it a hacky name that won't cause another build error when the definition is added to glibc. Signed-off-by: Omar Sandoval Reviewed-by: Eric Sandeen --- This is kind of ugly, but it's future-proof. The definition should probably be added to glibc, I'm guessing that was an oversight. src/test-nextquota.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/test-nextquota.c b/src/test-nextquota.c index 3baa296..ba4de27 100644 --- a/src/test-nextquota.c +++ b/src/test-nextquota.c @@ -40,8 +40,10 @@ #ifndef Q_GETNEXTQUOTA #define Q_GETNEXTQUOTA 0x800009 /* get disk limits and usage >= ID */ +#endif -struct nextdqblk +/* glibc 2.24 defines Q_GETNEXTQUOTA but not struct nextdqblk. */ +struct test_nextdqblk { u_int64_t dqb_bhardlimit; /* absolute limit on disk quota blocks alloc */ u_int64_t dqb_bsoftlimit; /* preferred limit on disk quota blocks */ @@ -54,7 +56,6 @@ struct nextdqblk u_int32_t dqb_valid; /* bitmask of QIF_* constants */ u_int32_t dqb_id; /* id for this quota info*/ }; -#endif #ifndef Q_XGETNEXTQUOTA #define Q_XGETNEXTQUOTA XQM_CMD(9) @@ -75,7 +76,7 @@ int main(int argc, char *argv[]) uint id = 0, idflag = 0; char *device = NULL; char *tmp; - struct nextdqblk dqb; + struct test_nextdqblk dqb; struct fs_disk_quota xqb; while ((c = getopt(argc,argv,"ugpi:d:v")) != EOF) { @@ -131,7 +132,7 @@ int main(int argc, char *argv[]) if (verbose) printf("asking for quota type %d for id %u on %s\n", type, id, device); - memset(&dqb, 0, sizeof(struct nextdqblk)); + memset(&dqb, 0, sizeof(struct test_nextdqblk)); memset(&xqb, 0, sizeof(struct fs_disk_quota)); if (verbose)