From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 7416C138CC6 for ; Fri, 20 Mar 2015 18:23:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0A842E094F; Fri, 20 Mar 2015 18:23:38 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8D2FEE094F for ; Fri, 20 Mar 2015 18:23:37 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6185F340C00 for ; Fri, 20 Mar 2015 18:23:36 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1791814296 for ; Fri, 20 Mar 2015 18:23:35 +0000 (UTC) From: "Anthony G. Basile" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anthony G. Basile" Message-ID: <1426875884.02d2b5c49a36b119da7e66c8c1499d38c1ce3e03.blueness@gentoo> Subject: [gentoo-commits] proj/hardened-dev:musl commit in: sys-libs/efivar/, sys-libs/efivar/files/ X-VCS-Repository: proj/hardened-dev X-VCS-Files: sys-libs/efivar/efivar-0.15-r99.ebuild sys-libs/efivar/files/efivar-0.15-portability.patch X-VCS-Directories: sys-libs/efivar/ sys-libs/efivar/files/ X-VCS-Committer: blueness X-VCS-Committer-Name: Anthony G. Basile X-VCS-Revision: 02d2b5c49a36b119da7e66c8c1499d38c1ce3e03 X-VCS-Branch: musl Date: Fri, 20 Mar 2015 18:23:35 +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-Archives-Salt: 9f5ed4e3-46c8-4b86-89ba-f4e0254a1d4c X-Archives-Hash: 1f4d5064c2e4ae2db3276fb1ed6db1c5 commit: 02d2b5c49a36b119da7e66c8c1499d38c1ce3e03 Author: layman localhost> AuthorDate: Fri Mar 20 03:01:03 2015 +0000 Commit: Anthony G. Basile gentoo org> CommitDate: Fri Mar 20 18:24:44 2015 +0000 URL: https://gitweb.gentoo.org/proj/hardened-dev.git/commit/?id=02d2b5c4 sys-libs/efivar: fix compilation against musl sys-libs/efivar/efivar-0.15-r99.ebuild | 28 +++++++++++++++++++++ .../efivar/files/efivar-0.15-portability.patch | 29 ++++++++++++++++++++++ 2 files changed, 57 insertions(+) diff --git a/sys-libs/efivar/efivar-0.15-r99.ebuild b/sys-libs/efivar/efivar-0.15-r99.ebuild new file mode 100644 index 0000000..f08fe58 --- /dev/null +++ b/sys-libs/efivar/efivar-0.15-r99.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/efivar/efivar-0.15.ebuild,v 1.5 2015/02/28 13:25:44 ago Exp $ + +EAPI=5 + +inherit multilib toolchain-funcs eutils + +DESCRIPTION="Tools and library to manipulate EFI variables" +HOMEPAGE="https://github.com/vathpela/efivar" +SRC_URI="https://github.com/vathpela/${PN}/releases/download/${PV}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" + +RDEPEND="dev-libs/popt" +DEPEND="${RDEPEND}" + +src_prepare() { + epatch "${FILESDIR}/${PN}-0.15-portability.patch" || die +} + +src_configure() { + tc-export CC + export libdir="/usr/$(get_libdir)" +} + diff --git a/sys-libs/efivar/files/efivar-0.15-portability.patch b/sys-libs/efivar/files/efivar-0.15-portability.patch new file mode 100644 index 0000000..2c824a0 --- /dev/null +++ b/sys-libs/efivar/files/efivar-0.15-portability.patch @@ -0,0 +1,29 @@ +Portability fixes: + +- Initialize outbuf with the expected size! fixes a segfault with musl. +- Really use __builtin_va_arg_pack_len(). + +--- a/src/efivar.h ++++ b/src/efivar.h +@@ -85,7 +85,7 @@ efi_set_variable(efi_guid_t guid, const char *name, + return -1; + } + +- if (__va_arg_pack_len() == 0) ++ if (__builtin_va_arg_pack_len() == 0) + return _efi_set_variable(guid, name, data, data_size, + attributes, 0644); + +diff --git a/src/makeguids.c b/src/makeguids.c +index 321a7e7..7d68b8a 100644 +--- a/src/makeguids.c ++++ b/src/makeguids.c +@@ -100,7 +100,7 @@ main(int argc, char *argv[]) + err(1, "makeguids: could not read \"%s\"", argv[1]); + + /* strictly speaking, this *has* to be too large. */ +- struct guidname *outbuf = calloc(inlen, sizeof (char)); ++ struct guidname *outbuf = calloc(inlen, sizeof (struct guidname)); + if (!outbuf) + err(1, "makeguids"); +