From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=DKIM_ADSP_ALL,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 27401 invoked from network); 31 Aug 2022 19:08:49 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 31 Aug 2022 19:08:49 -0000 Received: (qmail 32621 invoked by uid 550); 31 Aug 2022 19:08:35 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 32543 invoked from network); 31 Aug 2022 19:08:34 -0000 From: Duncan Bellamy DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denkimushi.com; s=dkim; t=1661972902; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VwzJDYiepqtp3P/eANw5Wgkpyq7f0ZkK7axgT6SFMrU=; b=V3sjjpP0V91uXLYa9dd6BrvnTcBkIB1LYNvFcXxS/7m8qoTT3A2iSEA/MwTfZ5U/dgiFf8 jBXdsI2hkpH7bAcyDwVoAaAE1yPoGAC1WjNxiyPUXDkLTLsQRtaRwHoWtbphy5AF3/j+lt nl9s74BWiIYiKawn0uC6gv2f4OP9Xxo= To: info@bnoordhuis.nl Cc: musl@lists.openwall.com, Duncan Bellamy Date: Wed, 31 Aug 2022 20:07:35 +0100 Message-Id: <20220831190735.52016-3-dunk@denkimushi.com> In-Reply-To: <20220831190735.52016-1-dunk@denkimushi.com> References: <20200119121247.37310-1-info@bnoordhuis.nl> <20220831190735.52016-1-dunk@denkimushi.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit ARC-Seal: i=1; s=dkim; d=denkimushi.com; t=1661972902; a=rsa-sha256; cv=none; b=lP2vsy2m59lwbrFEDaelYnB5GTi7CxTsRPJq1lu9egjv2I+eslf8nPB8Gy8v1yc4nOEV7u CCb9HOukDwCBr8fj0QP/mw6xQ+ggzOxXgKf+zCGUZszGMuoYxxoH3Pnq4+rqCIMj5ovkO7 7Zr1y44AoEs2EI6a353x0jpEGgSmgyg= ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=dunk@denkimushi.com smtp.mailfrom=dunk@denkimushi.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=denkimushi.com; s=dkim; t=1661972902; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VwzJDYiepqtp3P/eANw5Wgkpyq7f0ZkK7axgT6SFMrU=; b=QERX9/79TyBgnD00WcKQt2uQQekVzns4AX/Tv9UWC/aX/EFEhcx573XlpgUL+GRt/KYKsJ bkY/giGoiBGuaZqHfJGCuH7icWvVMQ0TQ++KUNIEhi9ruUvSLUSQaHRO85KLQZpz6uWHos yBURk0eaDEt2/Lx0E6DIGBM2h07L+U8= Subject: [musl] [PATCH 2/2] V3 src/stat/fstatat.c use new statx define --- src/stat/fstatat.c | 30 +++--------------------------- 1 file changed, 3 insertions(+), 27 deletions(-) diff --git a/src/stat/fstatat.c b/src/stat/fstatat.c index 74c51cf5..6b44f48a 100644 --- a/src/stat/fstatat.c +++ b/src/stat/fstatat.c @@ -1,4 +1,5 @@ #define _BSD_SOURCE +#define _GNU_SOURCE #include #include #include @@ -7,36 +8,11 @@ #include #include "syscall.h" -struct statx { - uint32_t stx_mask; - uint32_t stx_blksize; - uint64_t stx_attributes; - uint32_t stx_nlink; - uint32_t stx_uid; - uint32_t stx_gid; - uint16_t stx_mode; - uint16_t pad1; - uint64_t stx_ino; - uint64_t stx_size; - uint64_t stx_blocks; - uint64_t stx_attributes_mask; - struct { - int64_t tv_sec; - uint32_t tv_nsec; - int32_t pad; - } stx_atime, stx_btime, stx_ctime, stx_mtime; - uint32_t stx_rdev_major; - uint32_t stx_rdev_minor; - uint32_t stx_dev_major; - uint32_t stx_dev_minor; - uint64_t spare[14]; -}; - static int fstatat_statx(int fd, const char *restrict path, struct stat *restrict st, int flag) { struct statx stx; - int ret = __syscall(SYS_statx, fd, path, flag, 0x7ff, &stx); + int ret = __syscall(SYS_statx, fd, path, flag, STATX_BASIC_STATS, &stx); if (ret) return ret; *st = (struct stat){ @@ -152,6 +128,6 @@ int __fstatat(int fd, const char *restrict path, struct stat *restrict st, int f weak_alias(__fstatat, fstatat); -#if !_REDIR_TIME64 +#if !_REDIR_TIME64 && !defined(_GNU_SOURCE) weak_alias(fstatat, fstatat64); #endif -- 2.32.1 (Apple Git-133)