From patchwork Mon Nov 11 21:47:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 35806 Received: (qmail 77903 invoked by alias); 11 Nov 2019 21:48:35 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 77557 invoked by uid 89); 11 Nov 2019 21:48:26 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-20.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_NUMSUBJECT, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 spammy=HX-Languages-Length:887, HContent-Transfer-Encoding:8bit X-HELO: mail-out.m-online.net From: Lukasz Majewski To: Joseph Myers , Paul Eggert Cc: Alistair Francis , Alistair Francis , GNU C Library , Adhemerval Zanella , Florian Weimer , Florian Weimer , Zack Weinberg , Carlos O'Donell , Lukasz Majewski Subject: [PATCH 1/5] time: Introduce glibc's internal struct __itimerspec64 Date: Mon, 11 Nov 2019 22:47:54 +0100 Message-Id: <20191111214758.3677-2-lukma@denx.de> In-Reply-To: <20191111214758.3677-1-lukma@denx.de> References: <20191111214758.3677-1-lukma@denx.de> MIME-Version: 1.0 This change provides the glibc's internal struct itimerspec representation, which is explicitly supporting 64 bit time (by using struct __timespec64). Such representation is necessary to provide correct time after Y2038 (time_t overflow) on devides with __TIMESIZE == 32. Reviewed-by: Adhemerval Zanella --- include/time.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/time.h b/include/time.h index d7800eb30f..52ee213669 100644 --- a/include/time.h +++ b/include/time.h @@ -82,6 +82,17 @@ struct __timespec64 }; #endif +#if __TIMESIZE == 64 +# define __itimerspec64 itimerspec +#else +/* The glibc's internal representation of the struct itimerspec. */ +struct __itimerspec64 +{ + struct __timespec64 it_interval; + struct __timespec64 it_value; +}; +#endif + #if __TIMESIZE == 64 # define __ctime64 ctime #else