From patchwork Sat Aug 31 06:26:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: WHR X-Patchwork-Id: 1979270 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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 4WwlSL4VCRz1yXY for ; Sat, 31 Aug 2024 16:27:46 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6FC993864C5D for ; Sat, 31 Aug 2024 06:27:44 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from hkg.router.rivoreo (45.78.32.129.16clouds.com [45.78.32.129]) by sourceware.org (Postfix) with ESMTPS id 4AF3D3858420 for ; Sat, 31 Aug 2024 06:27:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4AF3D3858420 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=rivoreo.one Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivoreo.one ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4AF3D3858420 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=45.78.32.129 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725085645; cv=none; b=rCOa86NNMImKlUx0gD33eter6d1J2k65xgJXnKRT6tDOrIbdG8eaEPu5RzdqTcf/WWdGdVG4F41XBGSpb83ny2yXwFPVZPtvbhR7H8qIrZnh1ywUv6rp+rHPAHknyLTcwfrEzmnoQFIiwFMuibr/otmk0AzBqomoyI2C79SE8NE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725085645; c=relaxed/simple; bh=vV9mx6PRZosCwkDXBcH7KM5iB7zJUhQym3yV/ZN11qQ=; h=Message-ID:Date:Subject:From:To:MIME-Version; b=W7kRg/kvE8KY5sTdsgqahHSwF6WnUnu/aSUSNFlFcxGPcDwGHE8qUMkcdwg09NiCjL1F6U2gMKhqgBkuZwSe5+pIAkiSJbkuJTUoZlblp7/r/fJC3oHqW2mlx1X9l13mbQyrbHQpS4WjQ6qG5SApJbrhuDWq6ljda87klzi2Wbg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from tianjin2.rivoreo.one (unknown [10.100.1.128]) by hkg.router.rivoreo (Postfix) with ESMTPS id 400A411CF15 for ; Sat, 31 Aug 2024 06:27:22 +0000 (UTC) Received: from [10.1.105.1] (localhost [127.0.0.1]) by tianjin2.rivoreo.one (Postfix) with ESMTP id 2E7D370DDC for ; Sat, 31 Aug 2024 14:26:02 +0800 (CST) Received: from 10.1.107.31 (SquirrelMail authenticated user whr) by _ with HTTP; Sat, 31 Aug 2024 06:26:02 -0000 Message-ID: <7e80bdb5cf683107a7d709072d1ea721.squirrel@_> Date: Sat, 31 Aug 2024 06:26:02 -0000 Subject: [PATCH v3] libssp: Include 'libstd.h' for using alloca(3) [PR116547] From: "WHR" To: gcc-patches@gcc.gnu.org User-Agent: SquirrelMail/1.4.23 [Rivoreo] MIME-Version: 1.0 X-Priority: 3 (Normal) Importance: Normal X-Spam-Status: No, score=1.0 required=5.0 tests=BAYES_20, KAM_DMARC_STATUS, KAM_SHORT, RDNS_DYNAMIC, SPF_HELO_NONE, SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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 As GCC now treating implicit declaration of function as an error instead of warning, compilation of libssp has been broken on some operating systems. The following error is from an x86_64-unknown-freebsd11 system: libssp/ssp.c: In function 'fail': libssp/ssp.c:134:17: error: implicit declaration of function 'alloca' [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-function-declaration^G-Wimplicit-function-declaration8;;^G] 134 | p = buf = alloca (len); | ^~~~~~ Most operating systems specifies that 'stdlib.h' should be included to get the declaration of alloca(3). 2024-08-31 WHR PR other/116547 * ssp.c: Include stdlib.h for alloca(3). --- v2: Resend with correct MIME. v3: Resend with text/plain. --- a/libssp/ssp.c +++ b/libssp/ssp.c @@ -39,6 +39,9 @@ #ifdef HAVE_MALLOC_H # include #endif +#ifdef HAVE_STDLIB_H +# include +#endif #ifdef HAVE_STRING_H # include #endif