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 20075 invoked from network); 27 Aug 2022 23:13:25 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 27 Aug 2022 23:13:25 -0000 Received: (qmail 10190 invoked by uid 550); 27 Aug 2022 23:13:14 -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 10092 invoked from network); 27 Aug 2022 23:13:13 -0000 From: Duncan Bellamy DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denkimushi.com; s=dkim; t=1661641982; 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=PKM68deC//Ot5PNeWiu1gDSiOqmuj3UwTMwQhqBEiFk=; b=jR6bcgZwuSaQz5vBNGlZkc6+pJ241dxfYnunKn2IKY20/lxCtWen0eQXyU8Hq7ovFREuBK d4jis8iBsqn05gcFPS0eyJ5rK3tbukUPumxaMOYJzTzJKTqbqajhi4HlpvHLd2dcdHDFjb XArQAFlAAqtz4+BaFyBmDgGD10jxC/8= To: info@bnoordhuis.nl Cc: musl@lists.openwall.com, Duncan Bellamy Date: Sun, 28 Aug 2022 00:11:43 +0100 Message-Id: <20220827231143.3324909-3-dunk@denkimushi.com> In-Reply-To: <20220827231143.3324909-1-dunk@denkimushi.com> References: <20200119121247.37310-1-info@bnoordhuis.nl> <20220827231143.3324909-1-dunk@denkimushi.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit ARC-Seal: i=1; s=dkim; d=denkimushi.com; t=1661641982; a=rsa-sha256; cv=none; b=mEkdTXO8yZu1hhF8uY41ZTFuXfAh9czVch9PC8gNbhd7NeSj+fsLkQGiPGlQAdRgVIvUec 8Od0BeHSlUTa2Fm8Gf9RW4wHHv0eo5c3LaALE9rCNaDXEpG8kGhiRukVLZt7eUNXj8opus 3bFKHW5yXwzjT6+NsUeGNoVd3Q2KF7c= 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=1661641982; 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=PKM68deC//Ot5PNeWiu1gDSiOqmuj3UwTMwQhqBEiFk=; b=zivvB8lG9OOFnQ2X1UxKi8oX7Og4WLrWFBpUJv6u+XatXah1avTreQP6FW1Gi2RsaW8Iah aSvBEC8O+4LGzwkvkIxtJV6DfSuDPXBANZnrDzI6VNtjfFApzFM+GxQDORs2JL+1ASrb3U UoSfQIdqjL4w6HKOLNn8nLlFDPC5NbU= Subject: [musl] [PATCH 2/2] V2 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.37.1