From patchwork Fri Sep 1 05:20:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 111465 Delivered-To: patch@linaro.org Received: by 10.140.95.112 with SMTP id h103csp547441qge; Thu, 31 Aug 2017 22:21:02 -0700 (PDT) X-Received: by 10.98.81.4 with SMTP id f4mr985834pfb.96.1504243262020; Thu, 31 Aug 2017 22:21:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504243262; cv=none; d=google.com; s=arc-20160816; b=eTJ/WOgONINxZHKShHdNirxoy7gpaUdhmZWD33+OuShw0fXmrGYfvNYbIdmgA49VSu +TVwRtTrWFTA/beM5e1npKNiu3PErEUjw8QXZBXCRJvepDe7bNJMNWnC/fLC6XrhtVa8 SOi9FNg/fEhnvul1iPO2OviSWORN8+pzlBXAGAaOW2/5LsMsXer7J6Ed8YAS1fcpz2hk KwvK6iEnG9CWgZXjnRUrIe0kDJ49xd7YedT8DeNmv72bLdrYiydmTDpABVNJgWS5DOL0 jrKd/4B6SisqBJem5CHYWcp+IEZ6tqBKwuKXzYyieZ3g4JIXdvLxId3bBW9Pk9a2s9aL ADyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=86/qJ+Myg6M3S4RVADaX4rUaKdNEUhInDmue5/w5IMs=; b=r7TMSFocKDJ1Dot/gFPjKZp7QtuEUMlSXswmvfQJOQ+DSdvDHBehS6V6JuNFYk2FFZ CWstTObpTc5s5vQmyvn/Y8aGpNWJ6NpeM/zOcnfpWJS4aTe1yVHYGRJ2YR3QXTCkWhNe m+ykvitPkYtUbnkDyrEb1XbwEBHdiNaPq0yox+khfYSGdO6Pb3TU7u6vTmXTlKH8f3/K mhLjvr0NcXlPOixyyAXqI/J6JLxKjXyzdP8lnJKhAk7a3A+PJy4T+//k1xuwBILrueAV 3ndg1DXB3LTSGrjahLniyjkCr5aJOVphxzzhz2e34Q/FdEpH865kNESa2ddbzqPSuhNI BdKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=qlp3BrOd; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE 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 k188si467828pgc.29.2017.08.31.22.21.01; Thu, 31 Aug 2017 22:21:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-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=qlp3BrOd; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id A598378480; Fri, 1 Sep 2017 05:20:57 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pg0-f44.google.com (mail-pg0-f44.google.com [74.125.83.44]) by mail.openembedded.org (Postfix) with ESMTP id E71A078472 for ; Fri, 1 Sep 2017 05:20:55 +0000 (UTC) Received: by mail-pg0-f44.google.com with SMTP id t3so5233747pgt.0 for ; Thu, 31 Aug 2017 22:20:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=lC+X0rA5Fu239FpvywfM5W2mkOYz7kOxpIMlaWTT2ms=; b=qlp3BrOd9SUlONErbyMYfJoDn8stAZDtGV9SosIuR9iLeYbxDSh+goklMub5JeV4xK j5WGBz85tNFrA+7et+H6d0xkTJMD8x0wO7tOEibFbFyv+w+vouioFlLGKgoNBXDzwZBl gq4n0UkVRRWIQs8a9cPxQPfKiuFbH87253/IVfJq2wPlw8heGoyO/RUP89vaZTFP0iML eTmqb0KreWOs1USN9W13me17RrL+LFED0aJxQOP4DvG0JZQNVeRtrgj8MnFAuB4Ee8KM N0z7OITcSjMAl0W1GmIPj0x7HzgwJqv8G0raehfEndLnyTknZ7LuwDe0ykIA4ZIvCUMA jPqg== 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; bh=lC+X0rA5Fu239FpvywfM5W2mkOYz7kOxpIMlaWTT2ms=; b=NUfGRGDCEHiSFy+XGgVAxpxv/9x5jli2lIyji2RVPcI4P9qTU/w6LoswicLkOnfBiO OMYEJxLh6vvsfrNq7mSHZQQmCoWFMauit6YQN6KiVgS9Sb85PqkEa5Ne33XFgLKSH7K/ nG4LBjIRYiu5fLLZWxsWRHjiMwQE0ecSBWhy0/G5L8sVwHLeZsxSyFdW4+tb8ckLs4N5 4/IM8+X2wnkX+HqAN0OA6L/+LN32PFHphJNKbt84FCNwXJ446zJ7qy9HJcDExflhUsYT uVM+K7NQfTYZDkBCzsp2lCIqyai2oYAExzFladsrSHFt8c2FdtP7xa6oLMEcRf26ZDio PKWg== X-Gm-Message-State: AHPjjUg2j6yyXfkaxXuIZAJJJqa7fR+6x+XpnS8scjbUXZilnab7STMo E+t3yjhGWfA2rkI0 X-Google-Smtp-Source: ADKCNb5SqgSqajLHEkW2xwpnLsMXF2PWCjlVB3m1Hm9akCWENJHLjvRdV1u6oaA72zzMLPWe0C1YLQ== X-Received: by 10.84.131.129 with SMTP id d1mr1012056pld.114.1504243257153; Thu, 31 Aug 2017 22:20:57 -0700 (PDT) Received: from localhost.localdomain ([2601:646:8882:b8c::2e06]) by smtp.gmail.com with ESMTPSA id d63sm1672642pfc.40.2017.08.31.22.20.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 Aug 2017 22:20:56 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Thu, 31 Aug 2017 22:20:40 -0700 Message-Id: <20170901052040.24311-1-raj.khem@gmail.com> X-Mailer: git-send-email 2.14.1 Subject: [OE-core] [PATCH] pulseaudio: Backport a patch to replace use of VLAIS X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org Fix build with clang Signed-off-by: Khem Raj --- ...-don-t-use-variable-length-array-in-union.patch | 59 ++++++++++++++++++++++ .../pulseaudio/pulseaudio_10.0.bb | 1 + 2 files changed, 60 insertions(+) create mode 100644 meta/recipes-multimedia/pulseaudio/pulseaudio/pulseaudio-discuss-iochannel-don-t-use-variable-length-array-in-union.patch -- 2.14.1 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio/pulseaudio-discuss-iochannel-don-t-use-variable-length-array-in-union.patch b/meta/recipes-multimedia/pulseaudio/pulseaudio/pulseaudio-discuss-iochannel-don-t-use-variable-length-array-in-union.patch new file mode 100644 index 0000000000..11b56abd26 --- /dev/null +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio/pulseaudio-discuss-iochannel-don-t-use-variable-length-array-in-union.patch @@ -0,0 +1,59 @@ +From patchwork Sat Feb 4 12:19:01 2017 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [pulseaudio-discuss] iochannel: don't use variable length array in + union +From: Tanu Kaskinen +X-Patchwork-Id: 136885 +Message-Id: <20170204121901.17428-1-tanuk@iki.fi> +To: pulseaudio-discuss@lists.freedesktop.org +Date: Sat, 4 Feb 2017 14:19:01 +0200 + +Clang didn't like the variable length array: + +pulsecore/iochannel.c:358:17: error: fields must have a constant size: +'variable length array in structure' extension will never be supported + uint8_t data[CMSG_SPACE(sizeof(int) * nfd)]; + ^ + +Commit 451d1d6762 introduced the variable length array in order to have +the correct value in msg_controllen. This patch reverts that commit and +uses a different way to achieve the same goal. + +BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=99458 +--- +Upstream-Status: Backport +Signed-off-by: Khem Raj + + src/pulsecore/iochannel.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/src/pulsecore/iochannel.c b/src/pulsecore/iochannel.c +index 8ace297ff..897337522 100644 +--- a/src/pulsecore/iochannel.c ++++ b/src/pulsecore/iochannel.c +@@ -355,7 +355,7 @@ ssize_t pa_iochannel_write_with_fds(pa_iochannel*io, const void*data, size_t l, + struct iovec iov; + union { + struct cmsghdr hdr; +- uint8_t data[CMSG_SPACE(sizeof(int) * nfd)]; ++ uint8_t data[CMSG_SPACE(sizeof(int) * MAX_ANCIL_DATA_FDS)]; + } cmsg; + + pa_assert(io); +@@ -382,7 +382,13 @@ ssize_t pa_iochannel_write_with_fds(pa_iochannel*io, const void*data, size_t l, + mh.msg_iov = &iov; + mh.msg_iovlen = 1; + mh.msg_control = &cmsg; +- mh.msg_controllen = sizeof(cmsg); ++ ++ /* If we followed the example on the cmsg man page, we'd use ++ * sizeof(cmsg.data) here, but if nfd < MAX_ANCIL_DATA_FDS, then the data ++ * buffer is larger than needed, and the kernel doesn't like it if we set ++ * msg_controllen to a larger than necessary value. The commit message for ++ * commit 451d1d6762 contains a longer explanation. */ ++ mh.msg_controllen = CMSG_SPACE(sizeof(int) * nfd); + + if ((r = sendmsg(io->ofd, &mh, MSG_NOSIGNAL)) >= 0) { + io->writable = io->hungup = false; diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio_10.0.bb b/meta/recipes-multimedia/pulseaudio/pulseaudio_10.0.bb index f3a85737fc..9a34afaa7e 100644 --- a/meta/recipes-multimedia/pulseaudio/pulseaudio_10.0.bb +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio_10.0.bb @@ -3,6 +3,7 @@ require pulseaudio.inc SRC_URI = "http://freedesktop.org/software/pulseaudio/releases/${BP}.tar.xz \ file://0001-padsp-Make-it-compile-on-musl.patch \ file://0001-client-conf-Add-allow-autospawn-for-root.patch \ + file://pulseaudio-discuss-iochannel-don-t-use-variable-length-array-in-union.patch \ file://volatiles.04_pulse \ " SRC_URI[md5sum] = "4950d2799bf55ab91f6b7f990b7f0971"