From patchwork Tue Apr 16 03:28:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Oliva X-Patchwork-Id: 1923959 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=AJ/Pp4lt; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VJTzd0C9Yz1yZ2 for ; Tue, 16 Apr 2024 13:29:17 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4362C3858D35 for ; Tue, 16 Apr 2024 03:29:15 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-oo1-xc2c.google.com (mail-oo1-xc2c.google.com [IPv6:2607:f8b0:4864:20::c2c]) by sourceware.org (Postfix) with ESMTPS id AEDC03858C41 for ; Tue, 16 Apr 2024 03:28:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AEDC03858C41 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org AEDC03858C41 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::c2c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713238134; cv=none; b=xwsdZ6whittCMliTAriATOGtC46itG7GRS4lgdphi6oeCt2YCke9b7hzyPBr36uh5XLc0DTtLApV1WSicH/PyCA8a4wB8CWF5/7jff4ZlWKkxFIxIybJ99Gei8DTQ+uB+O1EVennS2xUB0JU0+ZFlczI32PjO7HnSKvGzo+6+kM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713238134; c=relaxed/simple; bh=EM33nh5qc8vI/7ZaitPoxYlA/H3Dx0qCSBAkO1fuKOU=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=PHw52md+mpopRGhDO2rWjrR88kTh4szOwYGJxnya8e36aZH5h9fjaFZUV3X1v5udw/MJYLuYeUAlaBfR1iFrMJFN9MkOA8pA3cLPVIo6ZF98BzgvZBPCifRRj7H6KD+4THUGmfOz+H6zoeJfKNfK2Z0hfG6vWje1garcZy/eBq4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oo1-xc2c.google.com with SMTP id 006d021491bc7-5acb90b2a82so899311eaf.0 for ; Mon, 15 Apr 2024 20:28:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1713238132; x=1713842932; darn=gcc.gnu.org; h=mime-version:user-agent:message-id:date:organization:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=nO1A6PuRz67+YSkkmz7UoEeRspvbezM26OUNk+nlyLg=; b=AJ/Pp4ltw3gFqBaK+e0vEhmUNs7e35PuukEsm05/Su1jDEAQF/qdXEg/2wC8L7k/Wq DSC7Hv3aJPts024oW5Kem7JzBx3ls+NeuHDTvhYLsbHNw1vTbDSCfKpki4x2EAjqEPzJ SE5A2dG9aO7ZgcgfWuQ3VtcUG2mrw/3upStryTgTrW2vLTjaSOKaaoxQnLOE60Jpsk/M rMvPYY9Rb4m7up2/dYE/d6UISV9v4c4wWCtxu4SzcW9v5tMBmqBoSQ3sXkQrD2dSShy7 Fp5ZoEFHfKY+rCk5H/Ut18XawwjuIjnaccSerAL5oZt5pWUXT4scDzRPrvaENC6UB0Mh Pg+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713238132; x=1713842932; h=mime-version:user-agent:message-id:date:organization:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=nO1A6PuRz67+YSkkmz7UoEeRspvbezM26OUNk+nlyLg=; b=kmfx3QA9rDai4Rnqufaftd3951YMICtt/uev549T+r88tms3OtMb9d8LMS6pahezd1 xuAfejmyAUGyhBSvqK9PDp2360xW1i8Vhlfe3sD5zV6DpZKXaK1bqcZvdVIgyt8VHE0Y GpTtHIhyCp+4PsTVWRpVk+gpTYQG/xPA7IIBgzoMpG0iPr8bJHq69CwPGpm1WuPwpTS9 poWBmLWEPK1DTHESdoDHDLA9j55jFl0+2gJFJpmBA+KzspOQaBhlzoca/tZ6mdHncmXC 4rylgf1bEUMeKjF0bqBtX4/1qK57U4Wg3UzvmClH14GRC8w/x3PA6zOJwHJHMhnkK4r2 Hm5A== X-Gm-Message-State: AOJu0Yw8aef32Y+F6KfV2j/GgT7DHGgRYETr+PI1wjkCpyp2aOgwABrz O3cJ8yDp3FU2PCkthcD3iD/YzCVyVpMZao7pB3iED8faIj1Kn7u/IDdvoEPYohbMQ2sSmb5/mAV /HQ== X-Google-Smtp-Source: AGHT+IGn8Tz3qn1GSHrxRZmego8UaIhowYrLWK6n2udUlqKMjuuF3NDSZ8S2+TDLiJAcjavVlVHXdA== X-Received: by 2002:a05:6358:596:b0:186:2e0a:b49f with SMTP id h22-20020a056358059600b001862e0ab49fmr13308327rwj.21.1713238131656; Mon, 15 Apr 2024 20:28:51 -0700 (PDT) Received: from free.home ([2804:7f1:218b:5e2:c43b:e0c4:71a:241b]) by smtp.gmail.com with ESMTPSA id x3-20020a170902b40300b001e43a00ee07sm8616134plr.211.2024.04.15.20.28.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 20:28:51 -0700 (PDT) Received: from livre (livre.home [172.31.160.2]) by free.home (8.15.2/8.15.2) with ESMTPS id 43G3SgrG2387544 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 16 Apr 2024 00:28:43 -0300 From: Alexandre Oliva To: gcc-patches@gcc.gnu.org Cc: Rainer Orth , Mike Stump , David Malcolm Subject: [PATCH] [testsuite] [analyzer] include sys/select.h if available Organization: Free thinker, does not speak for AdaCore Date: Tue, 16 Apr 2024 00:28:42 -0300 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, WEIRD_QUOTING autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Test that calls select fails on vxworks because select is only declared in sys/select.h. Include that header if it's present. Regstrapped on x86_64-linux-gnu. Also tested with gcc-13 on arm-, aarch64-, x86- and x86_64-vxworks7r2. Ok to install? for gcc/testsuite/ChangeLog * gcc.dg/analyzer/fd-glibc-byte-stream-connection-server.c: Include sys/select.h if present. --- .../fd-glibc-byte-stream-connection-server.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/testsuite/gcc.dg/analyzer/fd-glibc-byte-stream-connection-server.c b/gcc/testsuite/gcc.dg/analyzer/fd-glibc-byte-stream-connection-server.c index fcbcc740170e6..f922a52238f90 100644 --- a/gcc/testsuite/gcc.dg/analyzer/fd-glibc-byte-stream-connection-server.c +++ b/gcc/testsuite/gcc.dg/analyzer/fd-glibc-byte-stream-connection-server.c @@ -8,6 +8,9 @@ #include #include #include +#if __has_include() +#include +#endif #include #include #include