summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2015-07-19 22:15:13 +0000
committerMike Gilbert <floppym@gentoo.org>2015-07-19 22:15:13 +0000
commit12bf52bba4982626bf7b2362b79ea2897e9913cb (patch)
tree2dd8edab9928f4e9e40cfa7e81c2a2f08eeddfa1 /sys-libs
parentadd version 0.8.0_rc1 (diff)
downloadgentoo-2-12bf52bba4982626bf7b2362b79ea2897e9913cb.tar.gz
gentoo-2-12bf52bba4982626bf7b2362b79ea2897e9913cb.tar.bz2
gentoo-2-12bf52bba4982626bf7b2362b79ea2897e9913cb.zip
Fix build failure, bug 555384.
(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 0BBEEA1FEA4843A4)
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/efivar/ChangeLog6
-rw-r--r--sys-libs/efivar/efivar-0.21.ebuild8
-rw-r--r--sys-libs/efivar/files/0.21-initializer.patch42
3 files changed, 53 insertions, 3 deletions
diff --git a/sys-libs/efivar/ChangeLog b/sys-libs/efivar/ChangeLog
index cd8440711a1b..9890bc919707 100644
--- a/sys-libs/efivar/ChangeLog
+++ b/sys-libs/efivar/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sys-libs/efivar
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/efivar/ChangeLog,v 1.8 2015/07/19 17:15:14 floppym Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/efivar/ChangeLog,v 1.9 2015/07/19 22:15:13 floppym Exp $
+
+ 19 Jul 2015; Mike Gilbert <floppym@gentoo.org> +files/0.21-initializer.patch,
+ efivar-0.21.ebuild:
+ Fix build failure, bug 555384.
*efivar-0.21 (19 Jul 2015)
diff --git a/sys-libs/efivar/efivar-0.21.ebuild b/sys-libs/efivar/efivar-0.21.ebuild
index 846209985ee4..8a202ffe455e 100644
--- a/sys-libs/efivar/efivar-0.21.ebuild
+++ b/sys-libs/efivar/efivar-0.21.ebuild
@@ -1,10 +1,10 @@
# 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.21.ebuild,v 1.1 2015/07/19 17:15:14 floppym Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/efivar/efivar-0.21.ebuild,v 1.2 2015/07/19 22:15:13 floppym Exp $
EAPI=5
-inherit multilib toolchain-funcs
+inherit eutils multilib toolchain-funcs
DESCRIPTION="Tools and library to manipulate EFI variables"
HOMEPAGE="https://github.com/rhinstaller/efivar"
@@ -17,6 +17,10 @@ KEYWORDS="~amd64 ~ia64 ~x86"
RDEPEND="dev-libs/popt"
DEPEND="${RDEPEND}"
+src_prepare() {
+ epatch "${FILESDIR}/0.21-initializer.patch"
+}
+
src_configure() {
tc-export CC
export libdir="/usr/$(get_libdir)"
diff --git a/sys-libs/efivar/files/0.21-initializer.patch b/sys-libs/efivar/files/0.21-initializer.patch
new file mode 100644
index 000000000000..25d065968318
--- /dev/null
+++ b/sys-libs/efivar/files/0.21-initializer.patch
@@ -0,0 +1,42 @@
+From a3606c02fd271d32e364fcc540e34ba1899309f6 Mon Sep 17 00:00:00 2001
+From: Peter Jones <pjones@redhat.com>
+Date: Tue, 14 Jul 2015 09:33:54 -0400
+Subject: [PATCH] Sometimes the compiler doesn't like { 0, } as an
+ initializer...
+
+Because it really wants to be { {0, },} or something, and sometimes the
+compiler, knowing full well what we're trying to do, likes to complain
+about the rigor applied to our technique in doing it.
+
+memset() the struct ifreq to 0 instead so I don't need to figure out its
+internal structure just to zero it out.
+
+Resolves #28
+
+Signed-off-by: Peter Jones <pjones@redhat.com>
+---
+ src/linux.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/linux.c b/src/linux.c
+index 57f71f3..817b8e6 100644
+--- a/src/linux.c
++++ b/src/linux.c
+@@ -847,12 +847,13 @@ ssize_t
+ __attribute__((__visibility__ ("hidden")))
+ make_mac_path(uint8_t *buf, ssize_t size, const char * const ifname)
+ {
+- struct ifreq ifr = { 0, };
++ struct ifreq ifr;
+ struct ethtool_drvinfo drvinfo = { 0, };
+ int fd, rc;
+ ssize_t ret = -1, sz, off=0;
+ char busname[PATH_MAX+1] = "";
+
++ memset(&ifr, 0, sizeof (ifr));
+ strncpy(ifr.ifr_name, ifname, IF_NAMESIZE);
+ drvinfo.cmd = ETHTOOL_GDRVINFO;
+ ifr.ifr_data = (caddr_t)&drvinfo;
+--
+2.4.6
+