From patchwork Tue Nov 12 20:57:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 179237 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp8657417ilf; Tue, 12 Nov 2019 12:57:57 -0800 (PST) X-Google-Smtp-Source: APXvYqzlrjIbNrCD40Wxn5VJ9BLz6YEqPrqWg1Wt7dsH2doSHMvSe+yrbbCmx81Kmkk/cZ1tIwWT X-Received: by 2002:a63:e84f:: with SMTP id a15mr37746601pgk.309.1573592277092; Tue, 12 Nov 2019 12:57:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573592277; cv=none; d=google.com; s=arc-20160816; b=DOJO2OvFPO6crpAQRGJ94PsI63Ka8Zo9CnrAyj/HAPgovJzicfywh54LvHGG+c+qmL ZGcYg0Z5gWGQ3KXPPedVguwFmbna+U9esW6c1HefUr9X5aLrxxvVdJ8H5lkHjLVYaQG+ 5ZBaus1S5cxr8KXCJy6dQzVkQI5qR0E9sHHyaUHEe1unfsgA35N816mtH48NY0YjR5bO WeuiQeZ2v1gCPq7GIAJxl7UhXyL1GtMtcmvHhr38Qnaf4QU2DPnRt6jfrWJz8yR6JzYA 3atEae0i9Ly6kRmbUA2BB47uVeGUf0uhcUVZJ2UgrFNJH3LfJEmbZVYr3akZ+3PFEFBG EuVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:message-id:date:to:from:dkim-signature:delivered-to; bh=46RYBFFmZ8yCVZ9CFOGoIyHOkRAS530BUBA/inQxPaE=; b=lLgMLyA5w6Y60YQ47zzDUL1cvpBfBLZK0SpP3CSzkGU3G60q19Qp3zbI93FZZl4K4G K2+o/F7eC7eiK9irRX9LaXBMf63p6xtH4sEBbu5PovgyH3ZmtzJOKmnur+9P1VVpUtSq 7EXp7Q/3MgynXNcUc/sxebedjdtoFw13r0i42ckayr/EWKYF8gMlq9pu0zIglADwKYo0 bkw+HTzyfXpSOmRj0JGFfgOupwfOa2X3aM4mBI26GTxT3rcqV/4YXTdTSTpy+UJGP15f GoGewf1jjg4Qj5IT9ScUEIs7dS7uE6Q6tJINmEFZEaEUtvKStwkFKAueYsPyIRMBDVe2 goLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=LPawjNOD; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id 33si21198828plb.107.2019.11.12.12.57.56; Tue, 12 Nov 2019 12:57:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=LPawjNOD; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from ec2-34-214-78-129.us-west-2.compute.amazonaws.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 1B0417F660; Tue, 12 Nov 2019 20:57:53 +0000 (UTC) X-Original-To: openembedded-devel@lists.openembedded.org Delivered-To: openembedded-devel@lists.openembedded.org Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by mail.openembedded.org (Postfix) with ESMTP id 32FF37F65C for ; Tue, 12 Nov 2019 20:57:50 +0000 (UTC) Received: by mail-pf1-f195.google.com with SMTP id q13so1784020pff.2 for ; Tue, 12 Nov 2019 12:57:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=k0PpbARdHyRhmbcgI/DlHTvBya9mwLUMkgJqlQrT5VA=; b=LPawjNODgzxG2Vw7QZSn8Z0n44p97WPPk9Qu8pDmMabRvlPHPEdhcAp1zMGvjY66CB yMhiqx7wa7215N3I3/pIJzcqm5e84F7lidZuAww1cXFJbnSMq08M9kl8gfGVNXpC7RtI szBPM2eQbsalHn7+TLoc1W25WTWO1+4YmtEIxMI2szDahbzcu+j5xy0UULdxhu1J3NP3 8yrjB02GZM9jjNRHOJIEWnVeC+GWFLgcADEZGJ9Cr+nKshDrvcuqrGsIaOvY/XsEQJnq MQKD/Hi9uwHp1kyVRy/wcrNMsIcSL0WrIvybZrEml+LE4YhM4V2M7SrYR6ryLJIjQvhD cHwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=k0PpbARdHyRhmbcgI/DlHTvBya9mwLUMkgJqlQrT5VA=; b=R4BtvwIOHogiB5BfO5lcNG2famqwa0GTVq5Z7No0bXQqA8TxlAGlF8RQyhsLFp2JfC 48X14AJTrgZbopFC4VViLneWrHB79ad0vR0l4hckvBqkjX7fL3Lfe9iEwSHZt5HwcEcY dgg16IK6I8iLDvLGqxo7s3azEDs3m4m8mbY3A1glt2cSkJUGMPZCcE2BDv4FJ+niEa2H LJ5B1urzJa3L0Pj/JUG8A5PHcS9QAGCIfL6+V0165QVi4CLzl7QcXiF45aprAnthCB4o EfUzTVBFyBc6FkZWzwFmTuw71+gzSD/i5M1LhavR048NYV9MN7XM54aJKTCzuTmgmQG2 UtxA== X-Gm-Message-State: APjAAAUS8SKOPaxqdJ6RoukXm+54CBLL3uIHkPtA3Lnl9sH2a869BFNC KViYimQeS1RcMeH80ShBifUVm7vU1ms= X-Received: by 2002:a17:90a:d155:: with SMTP id t21mr8855345pjw.84.1573592271096; Tue, 12 Nov 2019 12:57:51 -0800 (PST) Received: from apollo.hsd1.ca.comcast.net ([2601:646:8500:1c20::30e8]) by smtp.gmail.com with ESMTPSA id c9sm12471676pfn.65.2019.11.12.12.57.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2019 12:57:50 -0800 (PST) From: Khem Raj To: openembedded-devel@lists.openembedded.org Date: Tue, 12 Nov 2019 12:57:36 -0800 Message-Id: <20191112205738.725884-1-raj.khem@gmail.com> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Subject: [oe] [meta-oe][PATCH 1/3] open-vm-tools: Enable tirpc explicitly, fix build with 64bit time_t X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-devel-bounces@lists.openembedded.org Errors-To: openembedded-devel-bounces@lists.openembedded.org These patches ensure that 64bit time_t is printed correctly, and on x86 do not limit time_t to be 4byte long Signed-off-by: Khem Raj --- ...FromNtTimeNsec-aware-of-64-bit-time_.patch | 78 +++++++++++++++++++ ...ux-Consider-64bit-time_t-possibility.patch | 41 ++++++++++ .../open-vm-tools/open-vm-tools_11.0.1.bb | 5 +- 3 files changed, 123 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-Make-HgfsConvertFromNtTimeNsec-aware-of-64-bit-time_.patch create mode 100644 meta-oe/recipes-support/open-vm-tools/open-vm-tools/0002-hgfsServerLinux-Consider-64bit-time_t-possibility.patch -- 2.24.0 -- _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel diff --git a/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-Make-HgfsConvertFromNtTimeNsec-aware-of-64-bit-time_.patch b/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-Make-HgfsConvertFromNtTimeNsec-aware-of-64-bit-time_.patch new file mode 100644 index 0000000000..61a681f17f --- /dev/null +++ b/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-Make-HgfsConvertFromNtTimeNsec-aware-of-64-bit-time_.patch @@ -0,0 +1,78 @@ +From caf80e220b055dbce259078be96e899dc78ec1d2 Mon Sep 17 00:00:00 2001 +From: Bartosz Brachaczek +Date: Tue, 12 Nov 2019 14:31:08 +0100 +Subject: [PATCH] Make HgfsConvertFromNtTimeNsec aware of 64-bit time_t on i386 + +I verified that this function behaves as expected on x86_64, i386 with +32-bit time_t, and i386 with 64-bit time_t for the following values of +ntTtime: + +UNIX_EPOCH-1, UNIX_EPOCH, UNIX_EPOCH+1, UNIX_S32_MAX-1, UNIX_S32_MAX, +UNIX_S32_MAX+1, UNIX_S32_MAX*2+1 + +I did not verify whether the use of Div643264 is optimal, performance +wise. + +Upstream-Status: Submitted [https://github.com/vmware/open-vm-tools/pull/387] +Signed-off-by: Khem Raj +--- + open-vm-tools/lib/hgfs/hgfsUtil.c | 34 +++++++++++++++++-------------- + 1 file changed, 19 insertions(+), 15 deletions(-) + +diff --git a/open-vm-tools/lib/hgfs/hgfsUtil.c b/open-vm-tools/lib/hgfs/hgfsUtil.c +index cc580ab8..49b10040 100644 +--- a/open-vm-tools/lib/hgfs/hgfsUtil.c ++++ b/open-vm-tools/lib/hgfs/hgfsUtil.c +@@ -110,23 +110,21 @@ HgfsConvertFromNtTimeNsec(struct timespec *unixTime, // OUT: Time in UNIX format + uint64 ntTime) // IN: Time in Windows NT format + { + #ifdef __i386__ +- uint32 sec; +- uint32 nsec; ++ uint64 sec64; ++ uint32 sec32, nsec; ++#endif + + ASSERT(unixTime); +- /* We assume that time_t is 32bit */ +- ASSERT_ON_COMPILE(sizeof (unixTime->tv_sec) == 4); + +- /* Cap NT time values that are outside of Unix time's range */ ++ if (sizeof (unixTime->tv_sec) == 4) { ++ /* Cap NT time values that are outside of Unix time's range */ + +- if (ntTime >= UNIX_S32_MAX) { +- unixTime->tv_sec = 0x7FFFFFFF; +- unixTime->tv_nsec = 0; +- return 1; ++ if (ntTime >= UNIX_S32_MAX) { ++ unixTime->tv_sec = 0x7FFFFFFF; ++ unixTime->tv_nsec = 0; ++ return 1; ++ } + } +-#else +- ASSERT(unixTime); +-#endif + + if (ntTime < UNIX_EPOCH) { + unixTime->tv_sec = 0; +@@ -135,9 +133,15 @@ HgfsConvertFromNtTimeNsec(struct timespec *unixTime, // OUT: Time in UNIX format + } + + #ifdef __i386__ +- Div643232(ntTime - UNIX_EPOCH, 10000000, &sec, &nsec); +- unixTime->tv_sec = sec; +- unixTime->tv_nsec = nsec * 100; ++ if (sizeof (unixTime->tv_sec) == 4) { ++ Div643232(ntTime - UNIX_EPOCH, 10000000, &sec32, &nsec); ++ unixTime->tv_sec = sec32; ++ unixTime->tv_nsec = nsec * 100; ++ } else { ++ Div643264(ntTime - UNIX_EPOCH, 10000000, &sec64, &nsec); ++ unixTime->tv_sec = sec64; ++ unixTime->tv_nsec = nsec * 100; ++ } + #else + unixTime->tv_sec = (ntTime - UNIX_EPOCH) / 10000000; + unixTime->tv_nsec = ((ntTime - UNIX_EPOCH) % 10000000) * 100; diff --git a/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0002-hgfsServerLinux-Consider-64bit-time_t-possibility.patch b/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0002-hgfsServerLinux-Consider-64bit-time_t-possibility.patch new file mode 100644 index 0000000000..0f64eabc94 --- /dev/null +++ b/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0002-hgfsServerLinux-Consider-64bit-time_t-possibility.patch @@ -0,0 +1,41 @@ +From fe56b67a2915a8632ea30604c14241f335dd3c15 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 12 Nov 2019 10:49:46 -0800 +Subject: [PATCH] hgfsServerLinux: Consider 64bit time_t possibility + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + .../lib/hgfsServer/hgfsServerLinux.c | 19 +++++-------------- + 1 file changed, 5 insertions(+), 14 deletions(-) + +diff --git a/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c b/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c +index 03175623..554da67f 100644 +--- a/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c ++++ b/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c +@@ -2561,20 +2561,11 @@ HgfsStatToFileAttr(struct stat *stats, // IN: stat information + LOG(4, ("%s: done, permissions %o%o%o%o, size %"FMT64"u\n", __FUNCTION__, + attr->specialPerms, attr->ownerPerms, attr->groupPerms, + attr->otherPerms, attr->size)); +-#ifdef __FreeBSD__ +-# if !defined(VM_X86_64) && __FreeBSD_version >= 500043 +-# define FMTTIMET "" +-# else +-# define FMTTIMET "l" +-# endif +-#else +-# define FMTTIMET "l" +-#endif +- LOG(4, ("access: %"FMTTIMET"d/%"FMT64"u \nwrite: %"FMTTIMET"d/%"FMT64"u \n" +- "attr: %"FMTTIMET"d/%"FMT64"u\n", +- stats->st_atime, attr->accessTime, stats->st_mtime, attr->writeTime, +- stats->st_ctime, attr->attrChangeTime)); +-#undef FMTTIMET ++ LOG(4, ("access: %jd/%"FMT64"u \nwrite: %jd/%"FMT64"u \n" ++ "attr: %jd/%"FMT64"u\n", ++ (intmax_t)stats->st_atime, attr->accessTime, ++ (intmax_t)stats->st_mtime, attr->writeTime, ++ (intmax_t)stats->st_ctime, attr->attrChangeTime)); + + attr->userId = stats->st_uid; + attr->groupId = stats->st_gid; diff --git a/meta-oe/recipes-support/open-vm-tools/open-vm-tools_11.0.1.bb b/meta-oe/recipes-support/open-vm-tools/open-vm-tools_11.0.1.bb index e43a39b613..9e4aa4881a 100644 --- a/meta-oe/recipes-support/open-vm-tools/open-vm-tools_11.0.1.bb +++ b/meta-oe/recipes-support/open-vm-tools/open-vm-tools_11.0.1.bb @@ -39,7 +39,10 @@ SRC_URI = "git://github.com/vmware/open-vm-tools.git;protocol=https \ file://0012-Use-off64_t-instead-of-__off64_t.patch;patchdir=.. \ file://0013-misc-Do-not-print-NULL-string-into-logs.patch;patchdir=.. \ file://0001-GitHub-Issue-367.-Remove-references-to-deprecated-G_.patch;patchdir=.. \ + file://0001-Make-HgfsConvertFromNtTimeNsec-aware-of-64-bit-time_.patch;patchdir=.. \ + file://0002-hgfsServerLinux-Consider-64bit-time_t-possibility.patch;patchdir=.. \ " + SRCREV = "d3edfd142a81096f9f58aff17d84219b457f4987" S = "${WORKDIR}/git/open-vm-tools" @@ -56,7 +59,7 @@ SYSTEMD_SERVICE_${PN} = "vmtoolsd.service" EXTRA_OECONF = "--without-icu --disable-multimon --disable-docs \ --disable-tests --without-gtkmm --without-xerces --without-pam \ --disable-vgauth --disable-deploypkg \ - --without-root-privileges --without-kernel-modules" + --without-root-privileges --without-kernel-modules --with-tirpc" NO_X11_FLAGS = "--without-x --without-gtk2 --without-gtk3" X11_DEPENDS = "libxext libxi libxrender libxrandr libxtst gtk+ gdk-pixbuf" From patchwork Tue Nov 12 20:57:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 179238 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp8657649ilf; Tue, 12 Nov 2019 12:58:11 -0800 (PST) X-Google-Smtp-Source: APXvYqyqVunGzxxFoYiMqj6EwqHT3PnkrK4HCbPG696dO9juWY0I4H60em1XqViRSZB2+DzAqdcC X-Received: by 2002:a17:90a:bf81:: with SMTP id d1mr9056935pjs.125.1573592291500; Tue, 12 Nov 2019 12:58:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573592291; cv=none; d=google.com; s=arc-20160816; b=eBtvqmx20xP4NycklqZhTO6QGAGW9XRS5Q4cUWVoT70OSVWVr+AAi5cGQXuy7Q6vHx F5HzgQs+HI1p6efCyuSJfP564y+h9GMdQyy2JLlEoNvlcm8onJYVx/J2y5g8bMTL2bza cbfRHYYWZGppbAwuGAbdd8/U0SmzyU7x7n8Pko03Y04ZB1b7yxfTBnX3iAu7NN4Jq83e PBoh9I6YMetrv/UYIXP7cEmPp35TLwelp/Ak7jMGXU9yqia1sQ2RbK7LdW64u8PrH477 rNJqBRfL3sndXqsxuK1JII/0Ccd/heZr4PvsY7WGajuRHOt64LRIlgsaXZoGVAXECQ0B aokg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:delivered-to; bh=IhojEASccRIfc5nYigroXlwzOpq4KIBsz1vc9yYCgnM=; b=PU6YwfrNy1u8wWXb9PkjC1r0agAGuvUmfIjfXxZ2HI2o9gKCtzImZZkD8p3mDKLa6D UncILAI6e5cME3GdNnng86X6z2UgrK2lpchl6o7bZtFKW2BSw1f+zY252O2NOk9baRn6 5gcxBsm0Dp+BYeMcf90m4FJGmgIZBaAGHTYDLGo4GDzz1byz2zyz6HDb5uJ/QtFwXjrh 5bEqzZh5PG4BblblQgzLyj7qnnMcgOIQP7mNCsyI8lBjx9sXflev3BEeBQRaIdOcrKo+ 3DdUYQQKwXiZKsARzcf6V9b8TjWEYbBquJjNfGUGHqs5C6Z93Eo64FIaR5swhqMnQ3zB 8IpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=uckxd32c; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id m65si8633470pfb.214.2019.11.12.12.58.11; Tue, 12 Nov 2019 12:58:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=uckxd32c; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from ec2-34-214-78-129.us-west-2.compute.amazonaws.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 133AB7F691; Tue, 12 Nov 2019 20:58:08 +0000 (UTC) X-Original-To: openembedded-devel@lists.openembedded.org Delivered-To: openembedded-devel@lists.openembedded.org Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) by mail.openembedded.org (Postfix) with ESMTP id 543E37F666 for ; Tue, 12 Nov 2019 20:57:53 +0000 (UTC) Received: by mail-pl1-f172.google.com with SMTP id bb5so39070plb.4 for ; Tue, 12 Nov 2019 12:57:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DpH1BWP/R6BunubbFUgRwW/zcMHbrV+2OyR1JpR2uD4=; b=uckxd32cDoj50rGnFK8jDZA9eZKIwQjKxTMBN7PEH3lzEBH8eXB0VzwZPr94rv0C4o /vQM67qLubzxA0bMuhCUOLdliHuw8dUe11d6Zsn2RuivacRgpeyJGL7He0tow3XQEHUp crlhnLqBswPAT/q7UmNWbn+XlGG8IjG4WhzHdkxMDXN3xKZvIEkvLEyKucROya9B18op FbflpnwIYHavfJMJ5InEVDUMuglrMcF70JytyX+LHD/fchOCcnP0RpkkPAnAIu658qb4 3I2ZNn9IbLo5lcFN7VPuTsqIEOaOcb9fNGrgbO+TLc4X+smy92ojStuNmqav1Ai7ov4J ZCAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DpH1BWP/R6BunubbFUgRwW/zcMHbrV+2OyR1JpR2uD4=; b=Ka0uhall1tt8JzJg3dfKGP4+bVdz9vEDLf8ATjgAkJ15DvozprMQqXp2t1WHe3T/S5 RHiPRIl6ggDBTSUEprpeZWS5fFz2nI05UdtBXnE35o06obK1r3nDI4OpIaT0e17gNBvf vNwD54USr5xcvWnH7stEFKSVCc+659wkpIC+Q61io/YvSRNLf/KJnCcXwJXxY6n6PdPP vClzQ5dznENxiikKREPAifZ3st3s+zB8gh3vrPcByFqZ0ZoBDwQFv2HP11Et5R5nn7u0 3Ucbe0OA9jPgll0/kQ5KRMVqenh5mSoW/imEyuIiv1C74n6W2xKHokAXC1E0n+qrJxQg CMaA== X-Gm-Message-State: APjAAAX1cQuGclbjcM07WEGsiT3znsByHrKU347lTsXYUzq0wfPNefhx EvT3+bwTg/QVnUkn/jTCuimjX4H+qqU= X-Received: by 2002:a17:902:d891:: with SMTP id b17mr21484913plz.256.1573592273784; Tue, 12 Nov 2019 12:57:53 -0800 (PST) Received: from apollo.hsd1.ca.comcast.net ([2601:646:8500:1c20::30e8]) by smtp.gmail.com with ESMTPSA id c9sm12471676pfn.65.2019.11.12.12.57.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2019 12:57:53 -0800 (PST) From: Khem Raj To: openembedded-devel@lists.openembedded.org Date: Tue, 12 Nov 2019 12:57:37 -0800 Message-Id: <20191112205738.725884-2-raj.khem@gmail.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191112205738.725884-1-raj.khem@gmail.com> References: <20191112205738.725884-1-raj.khem@gmail.com> MIME-Version: 1.0 Subject: [oe] [meta-multimedia][PATCH 2/3] tvheadend: Fix build with 64bit time_t X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-devel-bounces@lists.openembedded.org Errors-To: openembedded-devel-bounces@lists.openembedded.org use intmax_t to print time_t, makes it portable across musl/glibc Signed-off-by: Khem Raj --- .../0001-adjust-for-64bit-time_t.patch | 107 ++++++++++++++++++ .../recipes-dvb/tvheadend/tvheadend_git.bb | 4 +- 2 files changed, 110 insertions(+), 1 deletion(-) create mode 100644 meta-multimedia/recipes-dvb/tvheadend/tvheadend/0001-adjust-for-64bit-time_t.patch -- 2.24.0 -- _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel diff --git a/meta-multimedia/recipes-dvb/tvheadend/tvheadend/0001-adjust-for-64bit-time_t.patch b/meta-multimedia/recipes-dvb/tvheadend/tvheadend/0001-adjust-for-64bit-time_t.patch new file mode 100644 index 0000000000..9c7294aefb --- /dev/null +++ b/meta-multimedia/recipes-dvb/tvheadend/tvheadend/0001-adjust-for-64bit-time_t.patch @@ -0,0 +1,107 @@ +From 81f29b028473a3d8ac0aaeb126fc0336a98bb077 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 12 Nov 2019 11:03:16 -0800 +Subject: [PATCH] adjust for 64bit time_t + +Break assumption about time_t being of certain size, and use intmax_t to +print it where needed + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + src/cron.c | 4 ++-- + src/epggrab/module/psip.c | 2 +- + src/epggrab/otamux.c | 2 +- + src/parsers/parser_teletext.c | 2 +- + src/tvheadend.h | 6 +----- + src/webui/webui.c | 4 ++-- + 6 files changed, 8 insertions(+), 12 deletions(-) + +diff --git a/src/cron.c b/src/cron.c +index b2484070f..4f7f54ba3 100644 +--- a/src/cron.c ++++ b/src/cron.c +@@ -329,9 +329,9 @@ cron_next ( cron_t *c, const time_t now, time_t *ret ) + *ret = mktime(&tmp); + if (*ret <= now) { + #ifndef CRON_TEST +- tvherror(LS_CRON, "invalid time, now %"PRItime_t", result %"PRItime_t, now, *ret); ++ tvherror(LS_CRON, "invalid time, now %"PRItime_t", result %"PRItime_t, (intmax_t)now, (intmax_t)*ret); + #else +- printf("ERROR: invalid time, now %"PRItime_t", result %"PRItime_t"\n", now, *ret); ++ printf("ERROR: invalid time, now %"PRItime_t", result %"PRItime_t"\n", (intmax_t)now, (intmax_t)*ret); + #endif + *ret = now + 600; + } +diff --git a/src/epggrab/module/psip.c b/src/epggrab/module/psip.c +index d979ba12c..4f8e41642 100644 +--- a/src/epggrab/module/psip.c ++++ b/src/epggrab/module/psip.c +@@ -390,7 +390,7 @@ _psip_eit_callback_channel + + ebc = epg_broadcast_find_by_time(ch, mod, start, stop, 1, &save2, &changes2); + tvhtrace(LS_PSIP, " eid=%5d, start=%"PRItime_t", stop=%"PRItime_t", ebc=%p", +- eventid, start, stop, ebc); ++ eventid, (intmax_t)start, (intmax_t)stop, ebc); + if (!ebc) goto next; + + save2 |= epg_broadcast_set_dvb_eid(ebc, eventid, &changes2); +diff --git a/src/epggrab/otamux.c b/src/epggrab/otamux.c +index 495354390..cdabb0cd7 100644 +--- a/src/epggrab/otamux.c ++++ b/src/epggrab/otamux.c +@@ -719,7 +719,7 @@ epggrab_ota_start_cb ( void *p ); + static void + epggrab_ota_next_arm( time_t next ) + { +- tvhtrace(LS_EPGGRAB, "next ota start event in %li seconds", next - time(NULL)); ++ tvhtrace(LS_EPGGRAB, "next ota start event in %jd seconds", (intmax_t)(next - time(NULL))); + gtimer_arm_absn(&epggrab_ota_start_timer, epggrab_ota_start_cb, NULL, next); + dbus_emit_signal_s64("/epggrab/ota", "next", next); + } +diff --git a/src/parsers/parser_teletext.c b/src/parsers/parser_teletext.c +index ff39eb6ac..5a07299c4 100644 +--- a/src/parsers/parser_teletext.c ++++ b/src/parsers/parser_teletext.c +@@ -625,7 +625,7 @@ tt_construct_unix_time(uint8_t *buf) + r[2] = mktime(&tm); + + for(i = 0; i < 3; i++) +- v[i] = labs(r[i] - t); ++ v[i] = (time_t)llabs((long long)(r[i] - t)); + + if(v[0] < v[1] && v[0] < v[2]) + return r[0]; +diff --git a/src/tvheadend.h b/src/tvheadend.h +index 072391d3e..504c42253 100644 +--- a/src/tvheadend.h ++++ b/src/tvheadend.h +@@ -332,11 +332,7 @@ void tvh_qsort_r(void *base, size_t nmemb, size_t size, int (*compar)(const void + # endif /* ULONG_MAX */ + #endif /* __WORDSIZE */ + +-#if __WORDSIZE == 32 && defined(PLATFORM_FREEBSD) +-#define PRItime_t "d" +-#else +-#define PRItime_t "ld" +-#endif ++#define PRItime_t "jd" + + /* transcoding */ + #define TVH_NAME_LEN 32 +diff --git a/src/webui/webui.c b/src/webui/webui.c +index 3e63aeacc..fb429acd3 100644 +--- a/src/webui/webui.c ++++ b/src/webui/webui.c +@@ -944,9 +944,9 @@ http_dvr_playlist(http_connection_t *hc, int pltype, int urlauth, dvr_entry_t *d + strftime(buf, sizeof(buf), "%FT%T%z", localtime_r(&(de->de_start), &tm)); + + htsbuf_append_str(hq, "#EXTM3U\n"); +- htsbuf_qprintf(hq, "#EXTINF:%"PRItime_t",%s\n", durration, lang_str_get(de->de_title, NULL)); ++ htsbuf_qprintf(hq, "#EXTINF:%"PRItime_t",%s\n", (intmax_t)durration, lang_str_get(de->de_title, NULL)); + +- htsbuf_qprintf(hq, "#EXT-X-TARGETDURATION:%"PRItime_t"\n", durration); ++ htsbuf_qprintf(hq, "#EXT-X-TARGETDURATION:%"PRItime_t"\n", (intmax_t)durration); + uuid = idnode_uuid_as_str(&de->de_id, ubuf); + htsbuf_qprintf(hq, "#EXT-X-STREAM-INF:PROGRAM-ID=%s,BANDWIDTH=%d\n", uuid, bandwidth); + htsbuf_qprintf(hq, "#EXT-X-PROGRAM-DATE-TIME:%s\n", buf); diff --git a/meta-multimedia/recipes-dvb/tvheadend/tvheadend_git.bb b/meta-multimedia/recipes-dvb/tvheadend/tvheadend_git.bb index 5b3c469793..d7f749b647 100644 --- a/meta-multimedia/recipes-dvb/tvheadend/tvheadend_git.bb +++ b/meta-multimedia/recipes-dvb/tvheadend/tvheadend_git.bb @@ -8,7 +8,9 @@ DEPENDS = "avahi cmake-native dvb-apps libdvbcsa libpcre2 openssl uriparser zlib LICENSE = "GPLv3+" LIC_FILES_CHKSUM = "file://LICENSE.md;md5=9cae5acac2e9ee2fc3aec01ac88ce5db" -SRC_URI = "git://github.com/tvheadend/tvheadend.git" +SRC_URI = "git://github.com/tvheadend/tvheadend.git \ + file://0001-adjust-for-64bit-time_t.patch \ + " SRCREV = "fda89e85e0b6ae796d8a09e178d3937aa7869270" PV = "4.3+git${SRCPV}" From patchwork Tue Nov 12 20:57:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 179239 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp8657756ilf; Tue, 12 Nov 2019 12:58:18 -0800 (PST) X-Google-Smtp-Source: APXvYqwILUyzvb74O02+im6cHHPrMYo3yDegalaxQX9K5F9/QggIAf/uy5Z7NrR4XpeO1WmwF30T X-Received: by 2002:a17:902:7c07:: with SMTP id x7mr30918761pll.124.1573592298098; Tue, 12 Nov 2019 12:58:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573592298; cv=none; d=google.com; s=arc-20160816; b=c11q55til1gd6el9+eWEOQ1aHbwAm9U6MT4WAnFcBpAZYEaUnRzqzwbwknpBfndeDz 9AWN1VXgg1yqZXvYxcfbpua7Gy/tQsO6OWY+x9JPNYJvWSjt1t3ju8SzH538NAzkGONR kMYsRKT3/OQqYAuKsl2ik4gS8ZUe97DAduzBMaa9/GwckdpYdyt5HVcXuB3nxX1f3LcG OrNnGXIxPWJWWBoadiSUZPaVwmWyaY9kFODyRsvKoogpb4/34Mb2xQCC7UCqg6W4y364 ZBvLnQrzZG3ugRsAhWIwj5SgpuuzAADzbvq70kCh/21cWsngdobOjDuX8J0W8c82SJDn Ndaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:delivered-to; bh=AKi68hM6Hjsa/ddK/BRVqDTCVqJk41ps+k15xtEb/uw=; b=I9f9EAjwI/NqQGb8PxgrR0LfE4FRuMcPc1rNg2Nkr1DJcqigPon9syjWasdKHISLzq 9L1HFl4cx/q0XpjPtq8n6Y78YrfkHfXRq95NeYpyAJ4t3JWMciQTVfNqfqkVSDQb7n16 q92PpR93mznj4NSnWsfmvHOgFSwKY491s97Ti7qzfdwW/+T5y5s+x8iWsbR0YYpj0OGS z7/ggtjprD+vbBLIlagRk+t2XY67GqSJbz8p+RXtHYrck9IsabfEav7QLE3H9io+iQHa VOQPOnu0gb+w3CxfDJsYojNz9oK04nqQTOxjmrm+LgFI3hjxHd6t2/GG4Oihb+JXzmnc oxWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=UrMy4N9D; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id s12si1001183pjo.86.2019.11.12.12.58.17; Tue, 12 Nov 2019 12:58:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=UrMy4N9D; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from ec2-34-214-78-129.us-west-2.compute.amazonaws.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 58F987F69E; Tue, 12 Nov 2019 20:58:09 +0000 (UTC) X-Original-To: openembedded-devel@lists.openembedded.org Delivered-To: openembedded-devel@lists.openembedded.org Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by mail.openembedded.org (Postfix) with ESMTP id 6FEF87F68F for ; Tue, 12 Nov 2019 20:57:55 +0000 (UTC) Received: by mail-pl1-f195.google.com with SMTP id a18so26245plm.10 for ; Tue, 12 Nov 2019 12:57:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=K5ZLG8uiDsa6d8fvAN9Mu4Bp8NJKQBRaCBBPPpFxfPM=; b=UrMy4N9DhfhJdu4X3/9zSX8bJQBm6YP+iHkWZSAFnLt5iUh9JaAwc8lxjLjXGYLNIH ywDasKRC9iGzZKRyCGUXjwpXqjr/xCAMM2fbjoJQkKTWxJvLs5uX8KregZamlsN5m146 YAe36DNwuy0FL3YOuio8bSf0lc7r6+mjGIMH2QrUEAUNOscMDG+IfA5o6GBabDwCBfcf MTInWZB4LhxU5rU4Lvbh3TkBktCq+ERkcO4ET9Wd9h7/n8aoxv/YuYzW+YlEP38L+MDZ PLCRN0TUv2aoKMCowUmfxS3HS/qyKqRiml5t66MfDmpPzi4b1l9pO3HqtEfBXyGh1ncQ DY6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=K5ZLG8uiDsa6d8fvAN9Mu4Bp8NJKQBRaCBBPPpFxfPM=; b=LBUpZJTHDrsZqCljbZyHryRVrCmD8Dd4By7oULrTUEfTp0Jr3qrvAcTxOcj55DNCgi GLFa+UBnJhNxmYVtd6qR55y2T8cDblLJ2apUu3vtCd9F4x7uMVwL95Cm1cF5BT8uvcoc h1EbBYPEIwFi3/ouVYaLsO1zdcY6U8qxJChq49fng+A5ZXR3JbQSutkPYGqKD3DVQIMe zsUDO5JrGajEU3ceFT3mGYaJJepKsqbUOlAilG8naf0nkuq7bQRFAZr2qZV07Yo86xrD s8lBsYcXudzPsETngUOUEZsbDY712HTkGslxC4EZagwEd+AhgZ1ahOVYs+aXZozAUrXm GtrQ== X-Gm-Message-State: APjAAAXTtKh27+u1Ch/Z2SuTcVmU9eH8WtawnwY8eBuFaK3+lljxkhGE KxN4MkjR5Vm3LQaM2Tp50iFrkJ9SbS4= X-Received: by 2002:a17:902:b614:: with SMTP id b20mr14832861pls.305.1573592276058; Tue, 12 Nov 2019 12:57:56 -0800 (PST) Received: from apollo.hsd1.ca.comcast.net ([2601:646:8500:1c20::30e8]) by smtp.gmail.com with ESMTPSA id c9sm12471676pfn.65.2019.11.12.12.57.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2019 12:57:55 -0800 (PST) From: Khem Raj To: openembedded-devel@lists.openembedded.org Date: Tue, 12 Nov 2019 12:57:38 -0800 Message-Id: <20191112205738.725884-3-raj.khem@gmail.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191112205738.725884-1-raj.khem@gmail.com> References: <20191112205738.725884-1-raj.khem@gmail.com> MIME-Version: 1.0 Subject: [oe] [meta-python][PATCH 3/3] python-systemd: Include endian.h for htobe16 X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-devel-bounces@lists.openembedded.org Errors-To: openembedded-devel-bounces@lists.openembedded.org Fixes | systemd/util.c:112:39: error: implicit declaration of function 'htobe16' is invalid in C99 [-Werror,-Wimplicit-function-declaration] | addr->in6.sin6_port = htobe16(port); | ^ Signed-off-by: Khem Raj --- .../recipes-devtools/python/python-systemd.inc | 2 ++ .../python/python-systemd/endian.patch | 14 ++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python-systemd/endian.patch -- 2.24.0 -- _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel diff --git a/meta-python/recipes-devtools/python/python-systemd.inc b/meta-python/recipes-devtools/python/python-systemd.inc index 5be5de092a..f01165cf89 100644 --- a/meta-python/recipes-devtools/python/python-systemd.inc +++ b/meta-python/recipes-devtools/python/python-systemd.inc @@ -15,4 +15,6 @@ SRC_URI[sha256sum] = "fd0e44bf70eadae45aadc292cb0a7eb5b0b6372cd1b391228047d33895 # allow for common patches for python- and python3-systemd FILESEXTRAPATHS_prepend := "${THISDIR}/python-systemd:" +SRC_URI += "file://endian.patch" + SRC_URI_append_libc-musl = " file://0001-Provide-implementation-of-strndupa-for-musl.patch" diff --git a/meta-python/recipes-devtools/python/python-systemd/endian.patch b/meta-python/recipes-devtools/python/python-systemd/endian.patch new file mode 100644 index 0000000000..e09aea7336 --- /dev/null +++ b/meta-python/recipes-devtools/python/python-systemd/endian.patch @@ -0,0 +1,14 @@ +Include endian.h for missing definitions of htobe16 + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- a/systemd/util.c ++++ b/systemd/util.c +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + #include + #include + #include