From patchwork Sat Nov 20 21:09:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stafford Horne X-Patchwork-Id: 47969 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 68C0A3858424 for ; Sat, 20 Nov 2021 21:09:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 68C0A3858424 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1637442572; bh=0uZ3jYGWgW3RVQo36cK6bJPnl0QamvdP7r7cNWtltDY=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=Cl/yXEU9XN/2s6IHPpNNOlcZPslocSuicaztgkjGi2M+WnoUNINxmDZwWm3SVfejm j+gjIxsnWExxWnhQvVcBsJjaXuqHEj9F+Z3mgMiWes7GMbLHMwZv94LLuXkvrVf8Tn W7zA1hFexLpau8JPVXSvQSNuUcvy14jucp1BwUzo= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by sourceware.org (Postfix) with ESMTPS id 33DE33858D39 for ; Sat, 20 Nov 2021 21:09:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 33DE33858D39 Received: by mail-pl1-x62f.google.com with SMTP id m24so10793874pls.10 for ; Sat, 20 Nov 2021 13:09:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=0uZ3jYGWgW3RVQo36cK6bJPnl0QamvdP7r7cNWtltDY=; b=aIJtCBseTzxDy1Kl39sV26pp0R/W1fbiecI6oOchxTPDwAs2K/OBa7apOAauiUHz0L ey+sA0eFpiG8rlEiAwX46T1us7Hn2Y1hmLgSTbPkl7pi2SuQRU54MqOphuHt57M8C/K9 yIsLLU+7QEiuFKA1v5lZwp0Jjr34a4JTXClaJOBkv7kqh3vr5s/HDrvQZWCRhgVZKFOu qtcpVCtLia0RLDdx22PrXQflWK9jRyti/H9aXttfgTSaydVq6prETZK7UFRRNpqDMMuz 13bMP5vEN7RCAtawE/5aAa7BWS0Fqqo8BYNybBcKl5kyMG+oaOentzi6XmcgB/NEjzuC 74SA== X-Gm-Message-State: AOAM5307NQDUZNKbNxu0DlfItwkdARLX6kYZsKELdoGeoqL0IDeNAxcq Ys2Apd1SSwzP5m13R5w3S98TiBTdves= X-Google-Smtp-Source: ABdhPJwCMvGl/DeEJpCybRHHf8b7G3IK7PGKYf+6Mv6E41OFevxCkVfa+St8I3rg0pmDISGbhBnnOA== X-Received: by 2002:a17:90b:4b51:: with SMTP id mi17mr14562479pjb.48.1637442549871; Sat, 20 Nov 2021 13:09:09 -0800 (PST) Received: from localhost ([2409:10:24a0:4700:e8ad:216a:2a9d:6d0c]) by smtp.gmail.com with ESMTPSA id p14sm3181183pjl.32.2021.11.20.13.09.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Nov 2021 13:09:09 -0800 (PST) To: GLIBC patches Subject: [PATCH] linux: Define STAT64_IS_KERNEL_STAT64 by default Date: Sun, 21 Nov 2021 06:09:01 +0900 Message-Id: <20211120210901.3991578-1-shorne@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Spam-Status: No, score=-10.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Stafford Horne via Libc-alpha From: Stafford Horne Reply-To: Stafford Horne Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" In commit 36260d5035 ("linux: Set default kernel_stat.h to LFS") the default for STAT64_IS_KERNEL_STAT64 was removed. This patch adds it back. For architectures that want to used the default kernel_stat.h and do not have __NR_newfstatat, STAT64_IS_KERNEL_STAT64 needs to be defined. Set the default as 1 as modern port's stat64 struct should match the kernel stat64 layout. I tested this on the OpenRISC port and it seems to work fine. Currently, all archs that use the default kernel_stat.h define __NR_newfstatat so they will not use the STAT64_IS_KERNEL_STAT64 macro. However, arc seems to be an outlier it uses the default kernel_stat.h, but does not define __NR_newfstatat or __NR_fstatat64 I am not clear how arc works here. --- sysdeps/unix/sysv/linux/kernel_stat.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/kernel_stat.h b/sysdeps/unix/sysv/linux/kernel_stat.h index 6c1b175cb4..b8c376f41e 100644 --- a/sysdeps/unix/sysv/linux/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/kernel_stat.h @@ -20,3 +20,4 @@ #define XSTAT_IS_XSTAT64 1 #define STATFS_IS_STATFS64 __STATFS_MATCHES_STATFS64 #define STAT_IS_KERNEL_STAT 1 +#define STAT64_IS_KERNEL_STAT64 1