From patchwork Sun Apr 14 22:08:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 1085395 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-101368-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="MGfnR9pd"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44j5Q01thYz9s4V for ; Mon, 15 Apr 2019 08:09:11 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=BaswguxbBps8nm7/50DlVHn3DGlTlx0 i9fPluxJedFh2GC+0nn1uq9fWTD8FpHDpYUmuc33ZXINeEtlcyhe/dqruXezdyIF D9x6ZSJjRcjE3GM0IWSBEtA9b/PEy5jODRB1rQ1gjpno93ljpjQfYKsSO0mczBSg Hteil6Rzxidg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; s=default; bh=gQG2eZnFDVP4o69KrGCBJ3+vXDA=; b=MGfnR 9pdWFuls6wJZusOFl4qJFkshOva9LWdpfVaKJcAnrzGMmXgybmKQ1RJMupH4pyUp cfrsUWgSNbIhzA0S5MRWCYewS4Q2xpo8FMoYmpd2GGOM4/KBrOm2CH/+I/ynSOsT lZLtgPi3tbID7ym6KNVgwx7/IdHnMHIp1nC7zE= Received: (qmail 50671 invoked by alias); 14 Apr 2019 22:09:05 -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 50230 invoked by uid 89); 14 Apr 2019 22:09:04 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.1 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=H*Ad:D*ucla.edu, padding, H*r:192.168.8, 526 X-HELO: mail-out.m-online.net From: Lukasz Majewski To: libc-alpha@sourceware.org Cc: Paul Eggert , Joseph Myers , Lukasz Majewski Subject: [PATCH 1/6] y2038: Introduce internal for glibc struct __timespec64 Date: Mon, 15 Apr 2019 00:08:36 +0200 Message-Id: <20190414220841.20243-2-lukma@denx.de> In-Reply-To: <20190414220841.20243-1-lukma@denx.de> References: <20190414220841.20243-1-lukma@denx.de> This type is a glibc's type similar to struct timespec but whose tv_sec field is a __time64_t rather than a time_t, which makes it Y2038-proof and usable to pass between user code and Y2038-proof kernel syscalls (e.g. clock_gettime()). To support passing this structure to the kernel - the tv_pad, 32 bit padding field has been introduced. The placement of it depends on endiannes of the SoC. Tested on x86_64 and ARM. * include/time.h: Add struct __timespec64 definition --- include/time.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/include/time.h b/include/time.h index ac3163c2a5..a4a06201d5 100644 --- a/include/time.h +++ b/include/time.h @@ -5,6 +5,7 @@ # include # include # include