From patchwork Tue Apr 30 23:50:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Edward Liaw X-Patchwork-Id: 793513 Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8E6EC20013C for ; Tue, 30 Apr 2024 23:51:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714521107; cv=none; b=AabED8XZu/2YquBjF8TuK6iFQ/qrt0bju42/Qg6dUGeifu5pCinQ9yM9pzs+0WFbiGFtHtlix0BvyEuaInrkdDaL1EH0hKgYHSCbxGBvfAD8+NyQYuAr4QBQqn1clBnHj8AcJ2Cms0GhLai1P/Ab/97fxTbZOsCuQEuoG31rtlw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714521107; c=relaxed/simple; bh=HRxoUPmZK+egBgNy4OhOK7glTZfY/4OX4NkiGTUAjTM=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=ofmXhAfqNYetV5DdQickybbjzPcReKKTFOfm3y+NxHTSzFcPRrjDi+Q0dpLcdYwqrRHQ3S6q7AejQiQACFJISRzI5ZEa+v7ZSBd9t1igoznA3ROBgiR8GS348Peoqik/p5QSDB/loku3yjVMBQJQ3CHJc/g/irtDstWHKFEd3MM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--edliaw.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=iDr9gM+g; arc=none smtp.client-ip=209.85.219.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--edliaw.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="iDr9gM+g" Received: by mail-yb1-f201.google.com with SMTP id 3f1490d57ef6-ddaf2f115f2so9822608276.3 for ; Tue, 30 Apr 2024 16:51:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1714521104; x=1715125904; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=BDKXR6NuC+glA0BXehmJNQF6Ococeyr147OnKEva4Vw=; b=iDr9gM+gMIh5XxgAKIGS/ALzuqce0LleghVXkl9W8aFpkkZv/lMsAb2C0qLgtX+/10 UoGdQ4qrGtO2FnsnuJ75aryEXd19Faoi3lvNUXSg/OPTrfydlwESZt5i/TcpFb9YY+sC zznV35AD0y9BXgiieUI++XG5lSRaIeGNL0Nsi4ApEp/spw7EBjH+EK1F2JL395F3mcYR RZWp+QJVfQbMUI38//lccIOsDQbAygcsKXjXGYWE3k7efpzbomZuyBByof9maNkedpyJ ix/03c0fCfPFpa1jsMcJxG91YPdhu0U9AwuHbwGHwU2njCGdstK9efUxotp6lUFjTnrE pfcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714521104; x=1715125904; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=BDKXR6NuC+glA0BXehmJNQF6Ococeyr147OnKEva4Vw=; b=oHzQm2PtQx+8Fhk/qofwaieEtQUNnAJmz0tYlCm2oxudlpLL1Gc6slc7tabYO9BNOA RGawUB2oAj+R5j/qF+hdpcX/CamA5rkwRKu6AHINNyyaJ7ZLBMJRl2cQtHnUHZBa7ajz C9IRMpyGIOd/uI2G8ndFSU4UyArHUfgcmR2Bu4wS0VCOclymASKd+JDVKrIX5hHydt6K SzZ/9sREX8FLzyiX7yHNaYz/yieC5duOFvvQK+S2EiT/XqSwcgw6yezJ8Hy1E3o8fwKw lueIm7dspVlkW4XlAPUK0z3r7ReWhEbIH2siK1FPprwwLpa3GQ8BdSRWHZFNOv4FR68K RGOg== X-Forwarded-Encrypted: i=1; AJvYcCW37UQZxdUbqmMUCLbceHD8xJQ08Cgt7rcj5vL5bfA9V3d+dviNKsCkUbXoAs8hWtSmUAl+mjzUBhdg1K8alAF9rcPjinhBW8Otx8A= X-Gm-Message-State: AOJu0YxUSHgqd/kfnZ0k6SSd8KbOOboDu05UmIO/mwnTPkHghmyA8lCO Ij8RIvNFSq8X5dLJMbS4VXhfL9dyVOsq064o2OGWHH94ig/I2Wx7bvasGksAC7Q2LvB13bBULHC ZNA== X-Google-Smtp-Source: AGHT+IGfcAKXP1N1dvNy0xrDOZ0qhW7xFF1Rsec+ivNUN7q+falIURigI2OTwiYzGqmueTM565xtpnxyQP8= X-Received: from edliaw.c.googlers.com ([fda3:e722:ac3:cc00:24:72f4:c0a8:305d]) (user=edliaw job=sendgmr) by 2002:a05:6902:2b08:b0:de5:2325:72de with SMTP id fi8-20020a0569022b0800b00de5232572demr147825ybb.10.1714521104475; Tue, 30 Apr 2024 16:51:44 -0700 (PDT) Date: Tue, 30 Apr 2024 23:50:15 +0000 In-Reply-To: <20240430235057.1351993-1-edliaw@google.com> Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240430235057.1351993-1-edliaw@google.com> X-Mailer: git-send-email 2.45.0.rc0.197.gbae5840b3b-goog Message-ID: <20240430235057.1351993-7-edliaw@google.com> Subject: [PATCH v1 06/10] selftests/net: Define _GNU_SOURCE From: Edward Liaw To: shuah@kernel.org, Mark Brown , Jaroslav Kysela , Takashi Iwai , Jiri Kosina , Benjamin Tissoires , Sean Christopherson , Paolo Bonzini , Bongsu Jeon , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Alexandre Belloni , Jarkko Sakkinen , Dave Hansen , Edward Liaw , Andrew Morton , Muhammad Usama Anjum Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, kernel-team@android.com, linux-sound@vger.kernel.org, linux-input@vger.kernel.org, kvm@vger.kernel.org, netdev@vger.kernel.org, linux-rtc@vger.kernel.org, linux-sgx@vger.kernel.org 809216233555 ("selftests/harness: remove use of LINE_MAX") introduced asprintf into kselftest_harness.h, which is a GNU extension and needs _GNU_SOURCE to either be defined prior to including headers or with the -D_GNU_SOURCE flag passed to the compiler. Fixes: 809216233555 ("selftests/harness: remove use of LINE_MAX") Signed-off-by: Edward Liaw --- tools/testing/selftests/net/bind_wildcard.c | 1 + tools/testing/selftests/net/ip_local_port_range.c | 1 + tools/testing/selftests/net/reuseaddr_ports_exhausted.c | 2 ++ 3 files changed, 4 insertions(+) -- 2.45.0.rc0.197.gbae5840b3b-goog diff --git a/tools/testing/selftests/net/bind_wildcard.c b/tools/testing/selftests/net/bind_wildcard.c index b7b54d646b93..be0773cbc15b 100644 --- a/tools/testing/selftests/net/bind_wildcard.c +++ b/tools/testing/selftests/net/bind_wildcard.c @@ -1,5 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright Amazon.com Inc. or its affiliates. */ +#define _GNU_SOURCE #include #include diff --git a/tools/testing/selftests/net/ip_local_port_range.c b/tools/testing/selftests/net/ip_local_port_range.c index 193b82745fd8..08fbd3449ffa 100644 --- a/tools/testing/selftests/net/ip_local_port_range.c +++ b/tools/testing/selftests/net/ip_local_port_range.c @@ -6,6 +6,7 @@ * Tests assume that net.ipv4.ip_local_port_range is [40000, 49999]. * Don't run these directly but with ip_local_port_range.sh script. */ +#define _GNU_SOURCE #include #include diff --git a/tools/testing/selftests/net/reuseaddr_ports_exhausted.c b/tools/testing/selftests/net/reuseaddr_ports_exhausted.c index 066efd30e294..a5c40528837f 100644 --- a/tools/testing/selftests/net/reuseaddr_ports_exhausted.c +++ b/tools/testing/selftests/net/reuseaddr_ports_exhausted.c @@ -17,6 +17,8 @@ * * Author: Kuniyuki Iwashima */ +#define _GNU_SOURCE + #include #include #include