From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 288C0138334 for ; Thu, 14 Feb 2019 12:26:24 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 53348E08F3; Thu, 14 Feb 2019 12:26:23 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2B5BBE08F3 for ; Thu, 14 Feb 2019 12:26:22 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id ACD62335D57 for ; Thu, 14 Feb 2019 12:26:20 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DB3A8326 for ; Thu, 14 Feb 2019 12:26:18 +0000 (UTC) From: "Lars Wendler" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Lars Wendler" Message-ID: <1550147170.68b03f76599d145f0fe00ba9da0a45fb2c193fca.polynomial-c@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/giflib/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-libs/giflib/giflib-5.1.6-r1.ebuild media-libs/giflib/giflib-5.1.6.ebuild X-VCS-Directories: media-libs/giflib/ X-VCS-Committer: polynomial-c X-VCS-Committer-Name: Lars Wendler X-VCS-Revision: 68b03f76599d145f0fe00ba9da0a45fb2c193fca X-VCS-Branch: master Date: Thu, 14 Feb 2019 12:26:18 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 4eaa33a5-e42e-425c-9eec-f12d20e4dc4e X-Archives-Hash: fb3306ee49ed0a15b6ae56ec9e715c5c commit: 68b03f76599d145f0fe00ba9da0a45fb2c193fca Author: Arfrever Frehtes Taifersar Arahesis Apache Org> AuthorDate: Thu Feb 14 04:35:45 2019 +0000 Commit: Lars Wendler gentoo org> CommitDate: Thu Feb 14 12:26:10 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=68b03f76 media-libs/giflib: Use reallocarray() if available. Closes: https://bugs.gentoo.org/677956 Signed-off-by: Arfrever Frehtes Taifersar Arahesis Apache.Org> Signed-off-by: Lars Wendler gentoo.org> media-libs/giflib/{giflib-5.1.6.ebuild => giflib-5.1.6-r1.ebuild} | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/media-libs/giflib/giflib-5.1.6.ebuild b/media-libs/giflib/giflib-5.1.6-r1.ebuild similarity index 78% rename from media-libs/giflib/giflib-5.1.6.ebuild rename to media-libs/giflib/giflib-5.1.6-r1.ebuild index decea553a76..2569ad2ddb9 100644 --- a/media-libs/giflib/giflib-5.1.6.ebuild +++ b/media-libs/giflib/giflib-5.1.6-r1.ebuild @@ -26,6 +26,13 @@ src_prepare() { } multilib_src_compile() { + # Use reallocarray() from libc if available. + if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} -D_GNU_SOURCE -o "${T}/reallocarray_test" -x c - <<< $'#include \nint main() {void *p = reallocarray(NULL, 0, 0);}' 2> /dev/null; then + local -x CPPFLAGS="${CPPFLAGS} -D_GNU_SOURCE -DHAVE_REALLOCARRAY" + sed -e "s/ openbsd-reallocarray\.c//" -i Makefile || die + rm openbsd-reallocarray.c || die + fi + emake \ CC="$(tc-getCC)" \ CFLAGS="${CFLAGS} -std=gnu99 -fPIC -Wno-format-truncation" \