| Message ID | 20251029-fix-libgloss-i386-compile-issues-v1-1-26edcb02f69c@kernel.org |
|---|---|
| State | New |
| Headers |
Return-Path: <newlib-bounces~patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6650A3858C41 for <patchwork@sourceware.org>; Wed, 29 Oct 2025 06:59:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6650A3858C41 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=KtdryxEW X-Original-To: newlib@sourceware.org Delivered-To: newlib@sourceware.org Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by sourceware.org (Postfix) with ESMTPS id 54CBD3858D29 for <newlib@sourceware.org>; Wed, 29 Oct 2025 06:58:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 54CBD3858D29 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 54CBD3858D29 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=172.105.4.254 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1761721135; cv=none; b=YMHHyVzSoI2PSHT5dIGxJAEUcOCgNOatmpDMdva7W0CCQIsKR8GA56IQ5u1UdT6bAej3kswDsmhj/WcDcBEOIqh7aI1ylX7kpVsY4/HNGTJvAsuqetxw7AI961L/dvTXIQMcekYJv919Zt4eIwtBwQWeFGiMR2YEJi2b/4MJ53k= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1761721135; c=relaxed/simple; bh=Vhn3qR/pSJxB+3JT3zcH8QUmv7wp7PokndffKfHwFyg=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=DazDcY/vOrs4zsOw5BRpqKn3JZuw0O4CxSIbjbfnZ1NuVWoua6ojXYVwNpe/nsNtTIdAq0zrXnkSd/kqIcCtdp84ASFzGsDOtfF41raWzAePF3L3XbLVWfUHQD7DxV12gZe1wzIqW8OonaGmwBhqrytuQexnyjMF8HjUda+8LSQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 54CBD3858D29 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id C2F4160328 for <newlib@sourceware.org>; Wed, 29 Oct 2025 06:58:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D994EC4CEF7; Wed, 29 Oct 2025 06:58:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1761721134; bh=Vhn3qR/pSJxB+3JT3zcH8QUmv7wp7PokndffKfHwFyg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=KtdryxEWmO4s6dPoRO905jylM1DhTU/Mp211MeW3AWWqlgIrgyHBeGoa829pNpRtg fl+FDaddqP3VQ/+sVi7ta+fM0GRu0cyNKgXasuCdm2Kkw7UmQ8FGcIbjgIgXormA5P h+kb2WmcyCS4MAuPa/qg0aRdXL4x/PXC0nvMys2pREBsYjCg1+6jV2LKBVvjqC+B6Y LADdpya8WF/ZikWJDjZscPLllpKj/UMBLbX84CekoP81XPAtSEvv4R7J/ixhVUqjD7 zbXuyePaG+Q+ynluW3Ic88YgGmCJLXaLbnzd75qyT3AZF8pQ15mXjRKa3/xapyRDHs svRkSStZMP4lA== From: Vincent Mailhol <mailhol@kernel.org> Date: Wed, 29 Oct 2025 07:58:26 +0100 Subject: [PATCH 1/6] libgloss: i386: cygmon-gmon.c: add missing libc headers MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20251029-fix-libgloss-i386-compile-issues-v1-1-26edcb02f69c@kernel.org> References: <20251029-fix-libgloss-i386-compile-issues-v1-0-26edcb02f69c@kernel.org> In-Reply-To: <20251029-fix-libgloss-i386-compile-issues-v1-0-26edcb02f69c@kernel.org> To: newlib@sourceware.org Cc: Vincent Mailhol <mailhol@kernel.org> X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1666; i=mailhol@kernel.org; h=from:subject:message-id; bh=Vhn3qR/pSJxB+3JT3zcH8QUmv7wp7PokndffKfHwFyg=; b=owGbwMvMwCV2McXO4Xp97WbG02pJDJmMu6XkWyNNrzslKdyyM0lrOXrS8FVM5uGrDNbPAlW0T AsvzantKGVhEONikBVTZFlWzsmt0FHoHXboryXMHFYmkCEMXJwCMJE9PIwM56SFfll1r7v6c+/6 hu3a52N2HXNhFuT3X5DOGR6Yuc3kDSPDo4Lo4yErVRfunMl4f4/3l06j/l0ZsiuOv93/KWPi4YN cHAA= X-Developer-Key: i=mailhol@kernel.org; a=openpgp; fpr=ED8F700574E67F20E574E8E2AB5FEB886DBB99C2 X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_NONE, SPF_PASS, TXREP 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: newlib@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Newlib mailing list <newlib.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/newlib>, <mailto:newlib-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/newlib/> List-Post: <mailto:newlib@sourceware.org> List-Help: <mailto:newlib-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/newlib>, <mailto:newlib-request@sourceware.org?subject=subscribe> Errors-To: newlib-bounces~patchwork=sourceware.org@sourceware.org |
| Series |
libgloss: i386: fix compilation issues
|
|
Commit Message
Vincent Mailhol
Oct. 29, 2025, 6:58 a.m. UTC
Add includes for stdlib.h, string.h and unistd.h. This resolves below
GCC errors:
cygmon-gmon.c: In function 'monstartup':
cygmon-gmon.c:109:21: error: implicit declaration of function 'sbrk' [-Wimplicit-function-declaration]
109 | buffer = (char *) sbrk (monsize);
| ^~~~
cygmon-gmon.c:112:7: error: implicit declaration of function 'write'; did you mean 'fwrite'? [-Wimplicit-function-declaration]
112 | write (2, MSG , sizeof(MSG));
| ^~~~~
| fwrite
cygmon-gmon.c:115:3: error: implicit declaration of function 'bzero' [-Wimplicit-function-declaration]
115 | bzero (buffer, monsize);
| ^~~~~
cygmon-gmon.c: In function '_mcount':
cygmon-gmon.c:224:7: error: implicit declaration of function 'atexit' [-Wimplicit-function-declaration]
224 | atexit(_mcleanup);
| ^~~~~~
cygmon-gmon.c:66:1: note: 'atexit' is defined in header '<stdlib.h>'; this is probably fixable by adding '#include <stdlib.h>'
65 | #include "cygmon-gmon.h"
+++ |+#include <stdlib.h>
66 |
Signed-off-by: Vincent Mailhol <mailhol@kernel.org>
---
libgloss/i386/cygmon-gmon.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libgloss/i386/cygmon-gmon.c b/libgloss/i386/cygmon-gmon.c index 3c15b70d3..ac3af30a6 100644 --- a/libgloss/i386/cygmon-gmon.c +++ b/libgloss/i386/cygmon-gmon.c @@ -62,6 +62,10 @@ static char sccsid[] = "@(#)gmon.c 5.3 (Berkeley) 5/22/91"; #include <stdio.h> #endif +#include <stdlib.h> +#include <string.h> +#include <unistd.h> + #include "cygmon-gmon.h" /*