diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-08-22 22:11:24 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-08-22 22:11:24 +0000 |
commit | 973405bf52982f297cbd8930cbd9bf6b490ea394 (patch) | |
tree | 677007ee492cf5546a0fb5d45ce5430ad855b1dc /sys-apps/pciutils | |
parent | Removing vulnerable versions (diff) | |
download | gentoo-2-973405bf52982f297cbd8930cbd9bf6b490ea394.tar.gz gentoo-2-973405bf52982f297cbd8930cbd9bf6b490ea394.tar.bz2 gentoo-2-973405bf52982f297cbd8930cbd9bf6b490ea394.zip |
Add FreeBSD support to shut Diego Pettenò up #103241.
(Portage version: 2.0.51.22-r2)
Diffstat (limited to 'sys-apps/pciutils')
-rw-r--r-- | sys-apps/pciutils/ChangeLog | 6 | ||||
-rw-r--r-- | sys-apps/pciutils/files/pciutils-2.1.11-bsd.patch | 57 | ||||
-rw-r--r-- | sys-apps/pciutils/pciutils-2.1.11-r5.ebuild | 11 |
3 files changed, 68 insertions, 6 deletions
diff --git a/sys-apps/pciutils/ChangeLog b/sys-apps/pciutils/ChangeLog index 078a2713046d..730aef5cba05 100644 --- a/sys-apps/pciutils/ChangeLog +++ b/sys-apps/pciutils/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for sys-apps/pciutils # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/pciutils/ChangeLog,v 1.53 2005/08/22 17:24:16 gustavoz Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/pciutils/ChangeLog,v 1.54 2005/08/22 22:11:24 vapier Exp $ + + 22 Aug 2005; Mike Frysinger <vapier@gentoo.org> + +files/pciutils-2.1.11-bsd.patch, pciutils-2.1.11-r5.ebuild: + Add FreeBSD support to shut Diego Pettenò up #103241. 22 Aug 2005; Gustavo Zacarias <gustavoz@gentoo.org> pciutils-2.1.11-r5.ebuild: diff --git a/sys-apps/pciutils/files/pciutils-2.1.11-bsd.patch b/sys-apps/pciutils/files/pciutils-2.1.11-bsd.patch new file mode 100644 index 000000000000..dae78712c4dd --- /dev/null +++ b/sys-apps/pciutils/files/pciutils-2.1.11-bsd.patch @@ -0,0 +1,57 @@ +Fixup support for FreeBSD. + +Patch by Diego Pettenò. + +http://bugs.gentoo.org/103241 + +--- pcimodules.c ++++ pcimodules.c +@@ -16,7 +16,6 @@ + + #include <stdlib.h> + #include <stdio.h> +-#include <malloc.h> + #include <string.h> + #include <unistd.h> + #include <sys/utsname.h> +--- lib/fbsd-device.c ++++ lib/fbsd-device.c +@@ -13,10 +13,21 @@ + + #include <fcntl.h> + #include <string.h> ++#include <errno.h> + #include <unistd.h> ++#include <osreldate.h> + +-#include <pci/pcivar.h> +-#include <pci/pci_ioctl.h> ++#if __FreeBSD_version < 500000 ++# include <pci/pcivar.h> ++#else ++# include <dev/pci/pcivar.h> ++#endif ++ ++#if __FreeBSD_version < 430000 ++# include <pci/pci_ioctl.h> ++#else ++# include <sys/pciio.h> ++#endif + + #include "internal.h" + +@@ -75,8 +86,12 @@ + pi.pi_reg = pos; + pi.pi_width = len; + +- if (ioctl(d->access->fd, PCIOCREAD, &pi) < 0) +- d->access->error("fbsd_read: ioctl(PCIOCREAD) failed"); ++ if (ioctl(d->access->fd, PCIOCREAD, &pi) < 0) { ++ if (errno == ENODEV) ++ return 0; ++ else ++ d->access->error("fbsd_read: ioctl(PCIOCREAD) failed"); ++ } + + switch (len) + { diff --git a/sys-apps/pciutils/pciutils-2.1.11-r5.ebuild b/sys-apps/pciutils/pciutils-2.1.11-r5.ebuild index 07755424b552..c5aeec7b5689 100644 --- a/sys-apps/pciutils/pciutils-2.1.11-r5.ebuild +++ b/sys-apps/pciutils/pciutils-2.1.11-r5.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/pciutils/pciutils-2.1.11-r5.ebuild,v 1.3 2005/08/22 17:24:16 gustavoz Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/pciutils/pciutils-2.1.11-r5.ebuild,v 1.4 2005/08/22 22:11:24 vapier Exp $ inherit eutils flag-o-matic toolchain-funcs @@ -21,10 +21,11 @@ src_unpack() { unpack ${A} cd "${S}" - epatch ${FILESDIR}/pcimodules-${P}.diff - epatch ${FILESDIR}/${P}-sysfs.patch #38645 - epatch ${FILESDIR}/${P}-gentoo-paths.patch - epatch ${FILESDIR}/${PV}-scan.patch #from fedora + epatch "${FILESDIR}"/pcimodules-${P}.diff + epatch "${FILESDIR}"/${P}-sysfs.patch #38645 + epatch "${FILESDIR}"/${P}-gentoo-paths.patch + epatch "${FILESDIR}"/${PV}-scan.patch #from fedora + epatch "${FILESDIR}"/${P}-bsd.patch #103241 # Unconditionally use -fPIC for libs (#55238) # Make sure we respect $AR / $RANLIB / $CFLAGS |