From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dedi548.your-server.de (dedi548.your-server.de [85.10.215.148]) by sourceware.org (Postfix) with ESMTPS id 2EEE4385DC1A for ; Tue, 26 Jan 2021 14:16:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 2EEE4385DC1A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embedded-brains.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=sebastian.huber@embedded-brains.de Received: from sslproxy01.your-server.de ([78.46.139.224]) by dedi548.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1l4P91-00053I-7O for newlib@sourceware.org; Tue, 26 Jan 2021 15:16:35 +0100 Received: from [82.100.198.138] (helo=mail.embedded-brains.de) by sslproxy01.your-server.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1l4P91-0007PQ-4F for newlib@sourceware.org; Tue, 26 Jan 2021 15:16:35 +0100 Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id D161F2A1610 for ; Tue, 26 Jan 2021 15:16:34 +0100 (CET) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id n5YX0vj0bvVh for ; Tue, 26 Jan 2021 15:16:34 +0100 (CET) Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 838E32A165B for ; Tue, 26 Jan 2021 15:16:34 +0100 (CET) X-Virus-Scanned: amavisd-new at zimbra.eb.localhost Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 03Yn4vRxpMmA for ; Tue, 26 Jan 2021 15:16:34 +0100 (CET) Received: from zimbra.eb.localhost (unknown [192.168.96.242]) by mail.embedded-brains.de (Postfix) with ESMTPSA id 61E962A1610 for ; Tue, 26 Jan 2021 15:16:34 +0100 (CET) From: Sebastian Huber To: newlib@sourceware.org Subject: [PATCH v2] Align *utime*() with POSIX/glibc Date: Tue, 26 Jan 2021 15:16:31 +0100 Message-Id: <20210126141631.66748-1-sebastian.huber@embedded-brains.de> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Authenticated-Sender: smtp-embedded@poldinet.de X-Virus-Scanned: Clear (ClamAV 0.102.4/26061/Tue Jan 26 13:29:51 2021) X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2021 14:16:37 -0000 Change the prototypes to be in line with POSIX/glibc. This may fix issues with new warnings produced by GCC 11. Signed-off-by: Sebastian Huber --- newlib/libc/include/sys/_default_fcntl.h | 2 +- newlib/libc/include/sys/stat.h | 4 ++-- newlib/libc/include/sys/time.h | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/newlib/libc/include/sys/_default_fcntl.h b/newlib/libc/inclu= de/sys/_default_fcntl.h index b3177dd69..50a0de44b 100644 --- a/newlib/libc/include/sys/_default_fcntl.h +++ b/newlib/libc/include/sys/_default_fcntl.h @@ -221,7 +221,7 @@ extern int flock (int, int); #endif #if __GNU_VISIBLE #include -extern int futimesat (int, const char *, const struct timeval *); +extern int futimesat (int, const char *, const struct timeval [2]); #endif =20 /* Provide _ prototypes for functions provided by some versi= ons diff --git a/newlib/libc/include/sys/stat.h b/newlib/libc/include/sys/sta= t.h index 8769112b0..722ed0eff 100644 --- a/newlib/libc/include/sys/stat.h +++ b/newlib/libc/include/sys/stat.h @@ -153,10 +153,10 @@ int fstatat (int, const char *__restrict , struct s= tat *__restrict, int); int mkdirat (int, const char *, mode_t); int mkfifoat (int, const char *, mode_t); int mknodat (int, const char *, mode_t, dev_t); -int utimensat (int, const char *, const struct timespec *, int); +int utimensat (int, const char *, const struct timespec [2], int); #endif #if __POSIX_VISIBLE >=3D 200809 && !defined(__INSIDE_CYGWIN__) -int futimens (int, const struct timespec *); +int futimens (int, const struct timespec [2]); #endif =20 /* Provide prototypes for most of the _ names that are diff --git a/newlib/libc/include/sys/time.h b/newlib/libc/include/sys/tim= e.h index 84a429bf2..3be6c1e41 100644 --- a/newlib/libc/include/sys/time.h +++ b/newlib/libc/include/sys/time.h @@ -414,12 +414,12 @@ struct itimerval { #include =20 __BEGIN_DECLS -int utimes (const char *__path, const struct timeval *__tvp); +int utimes (const char *, const struct timeval [2]); =20 #if __BSD_VISIBLE int adjtime (const struct timeval *, struct timeval *); -int futimes (int, const struct timeval *); -int lutimes (const char *, const struct timeval *); +int futimes (int, const struct timeval [2]); +int lutimes (const char *, const struct timeval [2]); int settimeofday (const struct timeval *, const struct timezone *); #endif =20 --=20 2.26.2