From patchwork Mon Nov 29 15:33:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yann Sionneau X-Patchwork-Id: 1561268 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=kalray.eu header.i=@kalray.eu header.a=rsa-sha256 header.s=sec-sig-email header.b=3mtJRWTY; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=kalray.eu header.i=@kalray.eu header.a=rsa-sha256 header.s=32AE1B44-9502-11E5-BA35-3734643DEF29 header.b=GEj0swIr; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=uclibc-ng.org (client-ip=2a00:1828:2000:679::23; helo=helium.openadk.org; envelope-from=devel-bounces@uclibc-ng.org; receiver=) Received: from helium.openadk.org (helium.openadk.org [IPv6:2a00:1828:2000:679::23]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4J2qLj3bSbz9sS8 for ; Tue, 30 Nov 2021 02:40:43 +1100 (AEDT) Received: from helium.openadk.org (localhost [IPv6:::1]) by helium.openadk.org (Postfix) with ESMTP id 4F38A31E0BE0; Mon, 29 Nov 2021 16:40:31 +0100 (CET) X-Greylist: delayed 374 seconds by postgrey-1.36 at helium; Mon, 29 Nov 2021 16:40:05 CET Received: from fx408.security-mail.net (smtpout140.security-mail.net [85.31.212.148]) by helium.openadk.org (Postfix) with ESMTPS id 5CD4A31E0810 for ; Mon, 29 Nov 2021 16:40:05 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by fx408.security-mail.net (Postfix) with ESMTP id 440D81B7B385 for ; Mon, 29 Nov 2021 16:33:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kalray.eu; s=sec-sig-email; t=1638200031; bh=GHUvf0DNHnxyr5GcR9vQoSBZnsBXHWrDcpMGdyHc1iI=; h=From:To:Cc:Subject:Date; b=3mtJRWTYaYupAyzvGfG081DilTbKL9yId9fa1JLb8+C8W2YccqmWDoQ2hE4LnICkf XxQzy/G9+KLK0FCc2NU0z34M/lMItEjI9zV4WXOcTV3A4J3o7biVie+BHTgFrCIgDq yZ++3QI3jB5T9vJe1UUlCnXIRFJZicPcYb/PVpYE= Received: from fx408 (localhost [127.0.0.1]) by fx408.security-mail.net (Postfix) with ESMTP id F2A181B7B381 for ; Mon, 29 Nov 2021 16:33:50 +0100 (CET) X-Virus-Scanned: E-securemail Secumail-id: <5639.61a4f2de.bec8c.0> Received: from zimbra2.kalray.eu (unknown [217.181.231.53]) by fx408.security-mail.net (Postfix) with ESMTPS id BF4C71B7B374 for ; Mon, 29 Nov 2021 16:33:50 +0100 (CET) Received: from zimbra2.kalray.eu (localhost [127.0.0.1]) by zimbra2.kalray.eu (Postfix) with ESMTPS id A60A227E0387; Mon, 29 Nov 2021 16:33:50 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra2.kalray.eu (Postfix) with ESMTP id 8FDF227E0396; Mon, 29 Nov 2021 16:33:50 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.10.3 zimbra2.kalray.eu 8FDF227E0396 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kalray.eu; s=32AE1B44-9502-11E5-BA35-3734643DEF29; t=1638200030; bh=8NloPq7cKVanq5JlXXoy3QZDYHd9fDbIErEoNXV/Yqc=; h=From:To:Date:Message-Id; b=GEj0swIr3S9rcwCNggEhbWO5PA59pVi3Z+SvL2Mifn9cIhFtwhsGzzL+FfRpKKTlu C+DaaOfSLlk0bRxa7y36HoX7Y+0DGR0dnms6iZlb1oMSTMuI2xBtGFMRQjNz+uEbzf 1sQgmw8k55gdC+wfbjWAkr9si5KIv0MvabonAoXA= Received: from zimbra2.kalray.eu ([127.0.0.1]) by localhost (zimbra2.kalray.eu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id oh8ihrqlfpS3; Mon, 29 Nov 2021 16:33:50 +0100 (CET) Received: from junon.lin.mbt.kalray.eu (unknown [192.168.37.161]) by zimbra2.kalray.eu (Postfix) with ESMTPSA id 7796427E0387; Mon, 29 Nov 2021 16:33:50 +0100 (CET) From: Yann Sionneau To: devel@uclibc-ng.org Date: Mon, 29 Nov 2021 16:33:33 +0100 Message-Id: <20211129153335.32124-1-ysionneau@kalray.eu> X-Mailer: git-send-email 2.17.1 X-Virus-Scanned: by Secumail Message-ID-Hash: VSSJ7ONZSEQHPFV4K43YS3MQOWL2SQMA X-Message-ID-Hash: VSSJ7ONZSEQHPFV4K43YS3MQOWL2SQMA X-MailFrom: ysionneau@kalray.eu X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list Subject: [uclibc-ng-devel] [PATCH 1/3] kvx: fix warning about __BITS_PER_LONG not being defined List-Id: uClibc-ng Development List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Signed-off-by: Yann Sionneau --- libc/sysdeps/linux/kvx/bits/kernel_types.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libc/sysdeps/linux/kvx/bits/kernel_types.h b/libc/sysdeps/linux/kvx/bits/kernel_types.h index 832b17674..8f6bda8e9 100644 --- a/libc/sysdeps/linux/kvx/bits/kernel_types.h +++ b/libc/sysdeps/linux/kvx/bits/kernel_types.h @@ -7,6 +7,8 @@ #ifndef __ASM_GENERIC_POSIX_TYPES_H #define __ASM_GENERIC_POSIX_TYPES_H +#include + typedef unsigned long __kernel_dev_t; typedef unsigned long __kernel_ino_t; typedef unsigned int __kernel_mode_t; From patchwork Mon Nov 29 15:33:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yann Sionneau X-Patchwork-Id: 1561270 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=kalray.eu header.i=@kalray.eu header.a=rsa-sha256 header.s=sec-sig-email header.b=t+Wntdur; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=kalray.eu header.i=@kalray.eu header.a=rsa-sha256 header.s=32AE1B44-9502-11E5-BA35-3734643DEF29 header.b=NScCL7tz; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=uclibc-ng.org (client-ip=89.238.66.15; helo=helium.openadk.org; envelope-from=devel-bounces@uclibc-ng.org; receiver=) Received: from helium.openadk.org (helium.openadk.org [89.238.66.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4J2qLl1dBPz9sf8 for ; Tue, 30 Nov 2021 02:40:47 +1100 (AEDT) Received: from helium.openadk.org (localhost [IPv6:::1]) by helium.openadk.org (Postfix) with ESMTP id 403D231EFC3C; Mon, 29 Nov 2021 16:40:34 +0100 (CET) Received: from fx601.security-mail.net (smtpout140.security-mail.net [85.31.212.146]) by helium.openadk.org (Postfix) with ESMTPS id 5354031E0810 for ; Mon, 29 Nov 2021 16:40:15 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by fx601.security-mail.net (Postfix) with ESMTP id 776463ACE26 for ; Mon, 29 Nov 2021 16:33:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kalray.eu; s=sec-sig-email; t=1638200037; bh=C4gLCLJ7mKH0AwOBhaOGwgOTC52/1k4/JEZHXj0NuWw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=t+Wntdurqk7uv9bT00FfKzNQyJGBtyTbxdVB7ToKFT79POpAFKsZaslCS4rRmq/zo 806SpWpjYF1QszXzMZZWt1M/hnMEw2ssN17wdMg9zolJZwHw6YtgjsJi2foFn+cIaH vBVhqU0jsjWPmK5GAyuux1GKjkWAKR5uk++HHOLg= Received: from fx601 (localhost [127.0.0.1]) by fx601.security-mail.net (Postfix) with ESMTP id 553C53ACC87 for ; Mon, 29 Nov 2021 16:33:56 +0100 (CET) X-Virus-Scanned: E-securemail Secumail-id: <15e82.61a4f2e3.d728d.0> Received: from zimbra2.kalray.eu (unknown [217.181.231.53]) by fx601.security-mail.net (Postfix) with ESMTPS id D8A443ACB91 for ; Mon, 29 Nov 2021 16:33:55 +0100 (CET) Received: from zimbra2.kalray.eu (localhost [127.0.0.1]) by zimbra2.kalray.eu (Postfix) with ESMTPS id 7D88627E0387; Mon, 29 Nov 2021 16:33:55 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra2.kalray.eu (Postfix) with ESMTP id 6740327E0396; Mon, 29 Nov 2021 16:33:55 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.10.3 zimbra2.kalray.eu 6740327E0396 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kalray.eu; s=32AE1B44-9502-11E5-BA35-3734643DEF29; t=1638200035; bh=JY1/d9Bi4noaJU2GWNFjG+NeZYK639Vl7BDPlrCStPc=; h=From:To:Date:Message-Id; b=NScCL7tzzIb4KBYNUTs3YKutqJgQhWyWbeUo2WdufTzexen0KhyA2kTADLUuEfVX0 N3B4/qEXrIilAqRWkVh7rPpZMuborZP67707BPAaMvpML50DQU4hcLgIqsYDxJB341 hRA4SuZgNOWjNIsvDExumyd6BElo8r61R2/GbBiI= Received: from zimbra2.kalray.eu ([127.0.0.1]) by localhost (zimbra2.kalray.eu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 37Ng2LLkTu5i; Mon, 29 Nov 2021 16:33:55 +0100 (CET) Received: from junon.lin.mbt.kalray.eu (unknown [192.168.37.161]) by zimbra2.kalray.eu (Postfix) with ESMTPSA id 4E1D427E0387; Mon, 29 Nov 2021 16:33:55 +0100 (CET) From: Yann Sionneau To: devel@uclibc-ng.org Date: Mon, 29 Nov 2021 16:33:34 +0100 Message-Id: <20211129153335.32124-2-ysionneau@kalray.eu> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211129153335.32124-1-ysionneau@kalray.eu> References: <20211129153335.32124-1-ysionneau@kalray.eu> X-Virus-Scanned: by Secumail Message-ID-Hash: KDJQFVZ66Q63MAFEFWFXZ355EO7CXN7D X-Message-ID-Hash: KDJQFVZ66Q63MAFEFWFXZ355EO7CXN7D X-MailFrom: ysionneau@kalray.eu X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list Subject: [uclibc-ng-devel] [PATCH 2/3] Fix -Wundef related warnings List-Id: uClibc-ng Development List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Signed-off-by: Yann Sionneau --- ldso/include/dl-string.h | 2 +- libc/misc/fnmatch/fnmatch_loop.c | 2 +- libc/misc/regex/regex_internal.h | 2 +- libpthread/nptl/pthread_create.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ldso/include/dl-string.h b/ldso/include/dl-string.h index bf6997188..6cc76dbf9 100644 --- a/ldso/include/dl-string.h +++ b/ldso/include/dl-string.h @@ -257,7 +257,7 @@ static __always_inline char * _dl_simple_ltoahex(char *local, unsigned long i) /* On some (wierd) arches, none of this stuff works at all, so * disable the whole lot... */ /* The same applies for ARM FDPIC at least for the moment. */ -#if defined(__mips__) || (__FDPIC__) +#if defined(__mips__) || defined(__FDPIC__) # define SEND_STDERR(X) # define SEND_ADDRESS_STDERR(X, add_a_newline) diff --git a/libc/misc/fnmatch/fnmatch_loop.c b/libc/misc/fnmatch/fnmatch_loop.c index fdd451d43..32ee079a3 100644 --- a/libc/misc/fnmatch/fnmatch_loop.c +++ b/libc/misc/fnmatch/fnmatch_loop.c @@ -620,7 +620,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end, if (c == L('-') && *p != L(']')) { -#if _LIBC +#ifdef _LIBC /* We have to find the collation sequence value for C. Collation sequence is nothing we can regularly access. The sequence diff --git a/libc/misc/regex/regex_internal.h b/libc/misc/regex/regex_internal.h index 5d9154fa0..c0f61d4ce 100644 --- a/libc/misc/regex/regex_internal.h +++ b/libc/misc/regex/regex_internal.h @@ -58,7 +58,7 @@ #define gettext(msgid) (msgid) #define gettext_noop(String) String -#if (defined MB_CUR_MAX && HAVE_LOCALE_H && HAVE_WCTYPE_H && HAVE_WCHAR_H && HAVE_WCRTOMB && HAVE_MBRTOWC && HAVE_WCSCOLL) +#if (defined MB_CUR_MAX && defined HAVE_LOCALE_H && defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H && defined HAVE_WCRTOMB && defined HAVE_MBRTOWC && defined HAVE_WCSCOLL) # define RE_ENABLE_I18N #endif diff --git a/libpthread/nptl/pthread_create.c b/libpthread/nptl/pthread_create.c index 5a7957d6a..697af20e0 100644 --- a/libpthread/nptl/pthread_create.c +++ b/libpthread/nptl/pthread_create.c @@ -447,7 +447,7 @@ pthread_create ( performed in 'get_cached_stack'. This way we avoid doing this if the stack freshly allocated with 'mmap'. */ -#if TLS_TCB_AT_TP +#ifdef TLS_TCB_AT_TP /* Reference to the TCB itself. */ pd->header.self = pd; From patchwork Mon Nov 29 15:33:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yann Sionneau X-Patchwork-Id: 1561269 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=kalray.eu header.i=@kalray.eu header.a=rsa-sha256 header.s=sec-sig-email header.b=d+9/RnZ1; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=kalray.eu header.i=@kalray.eu header.a=rsa-sha256 header.s=32AE1B44-9502-11E5-BA35-3734643DEF29 header.b=Fyjc8BI0; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=uclibc-ng.org (client-ip=89.238.66.15; helo=helium.openadk.org; envelope-from=devel-bounces@uclibc-ng.org; receiver=) Received: from helium.openadk.org (helium.openadk.org [89.238.66.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4J2qLk13hzz9sVc for ; Tue, 30 Nov 2021 02:40:46 +1100 (AEDT) Received: from helium.openadk.org (localhost [IPv6:::1]) by helium.openadk.org (Postfix) with ESMTP id 5CDD131EFC31; Mon, 29 Nov 2021 16:40:33 +0100 (CET) Received: from fx304.security-mail.net (mxout.security-mail.net [85.31.212.48]) by helium.openadk.org (Postfix) with ESMTPS id 671E031E0874 for ; Mon, 29 Nov 2021 16:40:05 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by fx304.security-mail.net (Postfix) with ESMTP id 9BEF962885 for ; Mon, 29 Nov 2021 16:33:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kalray.eu; s=sec-sig-email; t=1638200037; bh=O57O91WwUg65x58EmlAd8eAi0zbq1jpBwxFhVFNc32Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=d+9/RnZ1PDf9qpNShWqzqOEoRqwCtCd7CdYAc8kemgiYL82BWRxJd4b4BqDqBf4A/ WInvR8wfSkTxwqHiw1iSu1apKmxVvZGZjE96cyVpj0B+9EPtju7vcv8WGSVCx1v/lf W+leT1lO6iGzsxW46hzdsuCdAGioEtTo4WFkvrlU= Received: from fx304 (localhost [127.0.0.1]) by fx304.security-mail.net (Postfix) with ESMTP id 538D362899 for ; Mon, 29 Nov 2021 16:33:57 +0100 (CET) X-Virus-Scanned: E-securemail Secumail-id: <59a4.61a4f2e4.c50d5.0> Received: from zimbra2.kalray.eu (unknown [217.181.231.53]) by fx304.security-mail.net (Postfix) with ESMTPS id 09DC46288E for ; Mon, 29 Nov 2021 16:33:56 +0100 (CET) Received: from zimbra2.kalray.eu (localhost [127.0.0.1]) by zimbra2.kalray.eu (Postfix) with ESMTPS id 9A2AF27E0398; Mon, 29 Nov 2021 16:33:56 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra2.kalray.eu (Postfix) with ESMTP id 84EE427E0396; Mon, 29 Nov 2021 16:33:56 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.10.3 zimbra2.kalray.eu 84EE427E0396 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kalray.eu; s=32AE1B44-9502-11E5-BA35-3734643DEF29; t=1638200036; bh=v5qhkzMsbz6tn8xOtOr9TVzZZyblWdE2wpiKR7nPBvg=; h=From:To:Date:Message-Id; b=Fyjc8BI02s/PSdXjThICslh/v7jDZgHSZX/c+vY2uOjj5P4g0kvTBvO3wHSaxToRr Tx4O5f+Pxld5LNejOfFzhPcbevgOSVGL/ZAfzyQmX+3PdZn9A9sA/QBeIiWy6fjqHR Jwx44X7g0yBe6CocQ79fU/N3FJeJYY52XEWc7Dhk= Received: from zimbra2.kalray.eu ([127.0.0.1]) by localhost (zimbra2.kalray.eu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 777WGg-gvoLz; Mon, 29 Nov 2021 16:33:56 +0100 (CET) Received: from junon.lin.mbt.kalray.eu (unknown [192.168.37.161]) by zimbra2.kalray.eu (Postfix) with ESMTPSA id 6C45D27E0387; Mon, 29 Nov 2021 16:33:56 +0100 (CET) From: Yann Sionneau To: devel@uclibc-ng.org Date: Mon, 29 Nov 2021 16:33:35 +0100 Message-Id: <20211129153335.32124-3-ysionneau@kalray.eu> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211129153335.32124-1-ysionneau@kalray.eu> References: <20211129153335.32124-1-ysionneau@kalray.eu> X-Virus-Scanned: by Secumail Message-ID-Hash: ECGS7CR2AP3TGPVNKTLOZEZRMQONLOPL X-Message-ID-Hash: ECGS7CR2AP3TGPVNKTLOZEZRMQONLOPL X-MailFrom: ysionneau@kalray.eu X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list Subject: [uclibc-ng-devel] [PATCH 3/3] Fix some warnings due to type issues List-Id: uClibc-ng Development List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Fixes those two warnings: In file included from : libc/sysdeps/linux/common/openat64.c:18:33: warning: 'openat64' alias between functions of incompatible types 'int(int, const char *, int, ...)' and 'int(int, const char *, int, mode_t)' {aka 'int(int, const char *, int, unsigned int)'} [-Wattribute-alias=] 18 | strong_alias_untyped(__openat64,openat64) | ^~~~~~~~ ./include/libc-symbols.h:177:31: note: in definition of macro '_strong_alias_untyped' 177 | extern __typeof (aliasname) aliasname __attribute__ ((alias (#name))) __attribute_copy__ (name); | ^~~~~~~~~ libc/sysdeps/linux/common/openat64.c:18:1: note: in expansion of macro 'strong_alias_untyped' 18 | strong_alias_untyped(__openat64,openat64) | ^~~~~~~~~~~~~~~~~~~~ libc/sysdeps/linux/common/openat64.c:14:12: note: aliased declaration here 14 | static int __openat64(int fd, const char *file, int oflag, mode_t mode) | ^~~~~~~~~~ and CC libc/sysdeps/linux/common/stat.os libc/sysdeps/linux/common/stat.c: In function 'stat': libc/sysdeps/linux/common/stat.c:28:40: warning: passing argument 3 of 'fstatat64' from incompatible pointer type [-Wincompatible-pointer-types] 28 | return fstatat64(AT_FDCWD, file_name, buf, 0); | ^~~ | | | struct stat * In file included from libc/sysdeps/linux/common/stat.c:11: ./include/sys/stat.h:258:35: note: expected 'struct stat64 * restrict' but argument is of type 'struct stat *' 258 | struct stat64 *__restrict __buf, int __flag) | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ Signed-off-by: Yann Sionneau --- libc/sysdeps/linux/common/openat64.c | 10 +++++++++- libc/sysdeps/linux/common/stat.c | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/libc/sysdeps/linux/common/openat64.c b/libc/sysdeps/linux/common/openat64.c index eda3e7db1..cd1b23fa5 100644 --- a/libc/sysdeps/linux/common/openat64.c +++ b/libc/sysdeps/linux/common/openat64.c @@ -9,10 +9,18 @@ #include <_lfs_64.h> #include #include +#include #ifdef __NR_openat -static int __openat64(int fd, const char *file, int oflag, mode_t mode) +static int __openat64(int fd, const char *file, int oflag, ...) { + va_list ap; + mode_t mode; + + va_start(ap, oflag); + mode = va_arg(ap, int); + va_end(ap); + return openat(fd, file, oflag | O_LARGEFILE, mode); } strong_alias_untyped(__openat64,openat64) diff --git a/libc/sysdeps/linux/common/stat.c b/libc/sysdeps/linux/common/stat.c index a860c0c7f..99ce8d2dd 100644 --- a/libc/sysdeps/linux/common/stat.c +++ b/libc/sysdeps/linux/common/stat.c @@ -25,7 +25,7 @@ int stat(const char *file_name, struct stat *buf) int stat(const char *file_name, struct stat *buf) { - return fstatat64(AT_FDCWD, file_name, buf, 0); + return fstatat64(AT_FDCWD, file_name, (struct stat64 *)buf, 0); } #elif __NR_statx && defined __UCLIBC_HAVE_STATX__ # include