From patchwork Wed Jul 16 19:17:21 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Joel Sherrill X-Patchwork-Id: 116435 Return-Path: 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 1719D385771D for ; Wed, 16 Jul 2025 19:18:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1719D385771D X-Original-To: newlib@sourceware.org Delivered-To: newlib@sourceware.org Received: from mail-yb1-f173.google.com (mail-yb1-f173.google.com [209.85.219.173]) by sourceware.org (Postfix) with ESMTPS id 917F53857B9E for ; Wed, 16 Jul 2025 19:17:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 917F53857B9E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rtems.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 917F53857B9E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.219.173 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1752693472; cv=none; b=xGbiDbAsb8ZJoDjhf/625iSboyjlqVXzTPYG6JOI8gyp8sTufVHVk4gUTfwjyaxLwhon8oZZKBbO4AVRBojLaQGDc6RF3M1E+8NHm773eJ8vsHJVz554S7imbVRGobXIUqt9eyASWLbAbu7XwpzVNnFMTpdaOH20Z15bVsmpY9U= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1752693472; c=relaxed/simple; bh=J12FiDr8a9uGiXIK0vqPoOQptgPyVdn8LykhQGoQ9f0=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=C720JvevPUaAeNBxomrLJGmuZH06R0lu+pHPaqfYgp2vJbbTPr9boFoV497Ye5JmjnRqJiW3g56k42xTn4JtpVUEn3/kTQQw/gI1a8CUCs5ea22y96b+smnU8tUla5wfD8PsSJnMCs6pJyv2Dpa/SD7vTQoCvk+6mv+FNz1cM7M= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 917F53857B9E Received: by mail-yb1-f173.google.com with SMTP id 3f1490d57ef6-e818a572828so188592276.1 for ; Wed, 16 Jul 2025 12:17:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752693471; x=1753298271; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=84ZQr+K877vFtVz7gL0hUQ8rtQVtpScdWPbbVCnWPiA=; b=nbxxHVr8IXHjyaJ8u0dtMZdgZBL99hottqu/BLyq5tu+qIZQCKBouRD+CNc7SWjmUc gxmwjTDwyyr9c1Nqyr3H6QUuVoWhi1Wsq7NhmuafzG+zJqbYwLcvyLEhyhqppuZsuqrZ wzHbhCztMp3w3qEUF/iu5SbNK88r7xL7wIQlVhoIEc6wIKiGSy4k1WTnCYnb5boTvYDu g3AlLMPDiw65mOMnU/JFlNMwi3lfwnE7GelTsKbv+LSrcS9kIhaWMMfgekxTvrKB7bC+ uBWyY35zTH5+WzXEbxpaC9El0V1TP1wgYF5Afw9sR01G8ludsQsVimbhdvpe+CnYNdR4 M8iA== X-Gm-Message-State: AOJu0YxxYSD7OfyZDg6jMYex88RnKtZIcbcJrugul19gOl0BnHC5Eb6x Gu2naDXUlvX2S1olUe5VBss/UBoMMSgS7MP8KIJy+23sozgULawhVQBOSoZYng== X-Gm-Gg: ASbGncuUn6jSCQitv02kcHt5l0yUazXpY63UvZ9dj/yI26G3cxdJA1jPwX8iYTszMvN avyoVRcV5lr82VKsvJbNloeLGMRrrxxKEopXonxWXkT4aDtw33fhHukHWLvCd2yK7UQ7SMJYY7Z qTM3fXkPU1HnAqB5pgqBY19cVMZlkizUm3JOeUm6RkYW6gW+6d4CIwyRlWQhSSzW8FzfZiPPjyc GkvEA3OI3IXgLMxYcU5I3BR/qSv8QdMCQEfdzWo9Lt0DjECCLajk7L8xKTb11EJYZYQ5hoZUKpi JQy4uuz7WDhRuamgpoSOendCKMncF1reixn9Q9yLL3WifOrJjtO3iSUJscWJx+Fqg/JkopI2DqU tbEo7Oixpn/N5wcs12xsvuuyDcX4p9+p5LjNd7xrgwEzkVku60oKoTh2BseZNusYKkKI0MiL8 X-Google-Smtp-Source: AGHT+IHGwilc6fFY3u8hKCtRebvp2sfR1ltj2Nkh/Epbl3RE/wF2RAp8quVR44Lszo7vyyrUtVcxCw== X-Received: by 2002:a05:6902:2783:b0:e82:17a1:5c15 with SMTP id 3f1490d57ef6-e8bc1c3cc06mr5829637276.10.1752693471312; Wed, 16 Jul 2025 12:17:51 -0700 (PDT) Received: from gitlab.oarcorp.com (d27-96-189-151.evv.wideopenwest.com. [96.27.151.189]) by smtp.gmail.com with ESMTPSA id 3f1490d57ef6-e8bbf6bf0d5sm937086276.25.2025.07.16.12.17.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Jul 2025 12:17:50 -0700 (PDT) From: Joel Sherrill To: newlib@sourceware.org Cc: Joel Sherrill Subject: [PATCH 1/1] libc/include/sys/stat.h: Adjust for RTEMS MIPS Date: Wed, 16 Jul 2025 14:17:21 -0500 Message-ID: <20250716191721.2102560-2-joel@rtems.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250716191721.2102560-1-joel@rtems.org> References: <20250716191721.2102560-1-joel@rtems.org> MIME-Version: 1.0 X-Spam-Status: No, score=-3037.3 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: newlib-bounces~patchwork=sourceware.org@sourceware.org The commit cited below introduced changes which included conditionals strictly on __mips__. This ignored tailoring for any environment on MIPS except that targeted by the author of the change. This patch just fixes this code for RTEMS. commit 467a2bdf17ad376dafada9f1734784f4611fa6fd Author: Jovan Dmitrović Date: Wed Jun 11 10:11:33 2025 +0200 mips: Implement MIPS HAL and UHI Implement abstract interface for MIPS, including unified hosting interface (UHI). Signed-off-by: Jovan Dmitrović --- newlib/libc/include/sys/stat.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/newlib/libc/include/sys/stat.h b/newlib/libc/include/sys/stat.h index 7edfe34ff..740997965 100644 --- a/newlib/libc/include/sys/stat.h +++ b/newlib/libc/include/sys/stat.h @@ -38,7 +38,7 @@ struct stat time_t st_atime; time_t st_mtime; time_t st_ctime; -#elif defined(__mips__) +#elif defined(__mips__) && !defined(__rtems__) time_t st_atime; long st_spare1; time_t st_mtime; @@ -60,7 +60,8 @@ struct stat #endif }; -#if !((defined(__svr4__) && !defined(__PPC__) && !defined(__sun__)) || defined(__mips__)) +#if !((defined(__svr4__) && !defined(__PPC__) && !defined(__sun__)) || \ + (defined(__mips__) && !defined(__rtems__))) #define st_atime st_atim.tv_sec #define st_ctime st_ctim.tv_sec #define st_mtime st_mtim.tv_sec