Compare commits
No commits in common. "a3c7f279cde8f65e808e0fc3b2fb05b96e318557" and "d53883435819b72643efbff312f309a2c4f374b6" have entirely different histories.
a3c7f279cd
...
d538834358
@ -1,58 +0,0 @@
|
|||||||
From c6de975fd6bf03c63ce11417dc92043deb495898 Mon Sep 17 00:00:00 2001
|
|
||||||
From: wuzx <wuzx1226@qq.com>
|
|
||||||
Date: Wed, 3 Aug 2022 16:40:13 +0000
|
|
||||||
Subject: [PATCH] libpciaccess add sw64
|
|
||||||
|
|
||||||
Add code related to sw64 in file configure configure.ac and openbsd_pci.c to support sw64 architecture.
|
|
||||||
|
|
||||||
Signed-off-by: wuzx <wuzx1226@qq.com>
|
|
||||||
---
|
|
||||||
configure | 3 +++
|
|
||||||
configure.ac | 3 +++
|
|
||||||
src/openbsd_pci.c | 2 +-
|
|
||||||
3 files changed, 7 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/configure b/configure
|
|
||||||
index 2eada1d..dc7e3ec 100755
|
|
||||||
--- a/configure
|
|
||||||
+++ b/configure
|
|
||||||
@@ -18576,6 +18576,9 @@ case $host_os in
|
|
||||||
*x86_64*|*amd64*)
|
|
||||||
PCIACCESS_LIBS="$PCIACCESS_LIBS -lx86_64"
|
|
||||||
;;
|
|
||||||
+ *sw_64*)
|
|
||||||
+ PCIACCESS_LIBS="$PCIACCESS_LIBS -lsw_64"
|
|
||||||
+ ;;
|
|
||||||
*alpha*)
|
|
||||||
PCIACCESS_LIBS="$PCIACCESS_LIBS -lalpha"
|
|
||||||
;;
|
|
||||||
diff --git a/configure.ac b/configure.ac
|
|
||||||
index bfc75ae..00fcd4f 100644
|
|
||||||
--- a/configure.ac
|
|
||||||
+++ b/configure.ac
|
|
||||||
@@ -82,6 +82,9 @@ case $host_os in
|
|
||||||
*x86_64*|*amd64*)
|
|
||||||
PCIACCESS_LIBS="$PCIACCESS_LIBS -lx86_64"
|
|
||||||
;;
|
|
||||||
+ *sw_64*)
|
|
||||||
+ PCIACCESS_LIBS="$PCIACCESS_LIBS -lsw_64"
|
|
||||||
+ ;;
|
|
||||||
*alpha*)
|
|
||||||
PCIACCESS_LIBS="$PCIACCESS_LIBS -lalpha"
|
|
||||||
;;
|
|
||||||
diff --git a/src/openbsd_pci.c b/src/openbsd_pci.c
|
|
||||||
index c061fd8..990860b 100644
|
|
||||||
--- a/src/openbsd_pci.c
|
|
||||||
+++ b/src/openbsd_pci.c
|
|
||||||
@@ -133,7 +133,7 @@ pci_device_openbsd_read_rom(struct pci_device *device, void *buffer)
|
|
||||||
return ENOSYS;
|
|
||||||
|
|
||||||
if (priv->base.rom_size == 0) {
|
|
||||||
-#if defined(__alpha__) || defined(__amd64__) || defined(__i386__)
|
|
||||||
+#if defined(__alpha__) || defined(__sw_64__) || defined(__amd64__) || defined(__i386__)
|
|
||||||
if ((device->device_class & 0x00ffff00) ==
|
|
||||||
((PCI_CLASS_DISPLAY << 16) |
|
|
||||||
(PCI_SUBCLASS_DISPLAY_VGA << 8))) {
|
|
||||||
--
|
|
||||||
2.33.0
|
|
||||||
|
|
||||||
35
0001-linux-Set-number-of-devices-to-0-in-case-of-error.patch
Normal file
35
0001-linux-Set-number-of-devices-to-0-in-case-of-error.patch
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
From 44f3dd08f99ba67e967980daaea2b800c68e2659 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Olivier Fourdan <ofourdan@redhat.com>
|
||||||
|
Date: Wed, 24 Oct 2018 10:11:49 +0200
|
||||||
|
Subject: [PATCH 1/3] linux: Set number of devices to 0 in case of error
|
||||||
|
|
||||||
|
pci_sys is a global variable which is populated on init, and in case of
|
||||||
|
error reading sysfs on Linux, the devices are NULL, but the number of
|
||||||
|
devices is left unchanged.
|
||||||
|
|
||||||
|
As a result, we may crash in `pci_device_next()` which relies on the
|
||||||
|
number of devices.
|
||||||
|
|
||||||
|
To fix the issue, simply reset the number of devices to zero in case of
|
||||||
|
error so we don't try to access indices of a NULL array later on.
|
||||||
|
|
||||||
|
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
|
||||||
|
---
|
||||||
|
src/linux_sysfs.c | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/src/linux_sysfs.c b/src/linux_sysfs.c
|
||||||
|
index a8bc2e1..e74ad72 100644
|
||||||
|
--- a/src/linux_sysfs.c
|
||||||
|
+++ b/src/linux_sysfs.c
|
||||||
|
@@ -264,6 +264,7 @@ populate_entries( struct pci_system * p )
|
||||||
|
if (err) {
|
||||||
|
free(p->devices);
|
||||||
|
p->devices = NULL;
|
||||||
|
+ p->num_devices = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return err;
|
||||||
|
--
|
||||||
|
2.19.1
|
||||||
|
|
||||||
BIN
libpciaccess-0.14.tar.bz2
Normal file
BIN
libpciaccess-0.14.tar.bz2
Normal file
Binary file not shown.
Binary file not shown.
@ -1,18 +1,18 @@
|
|||||||
Name: libpciaccess
|
Name: libpciaccess
|
||||||
Version: 0.17
|
Version: 0.14
|
||||||
Release: 1
|
Release: 4
|
||||||
Summary: Generic PCI access library
|
Summary: Generic PCI access library
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://www.x.org/
|
URL: https://www.x.org/
|
||||||
|
|
||||||
Source0: https://www.x.org/archive/individual/lib/%{name}-%{version}.tar.gz
|
Source0: https://www.x.org/archive/individual/lib/%{name}-%{version}.tar.bz2
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
|
||||||
|
|
||||||
|
|
||||||
Patch0: 0000-libpciaccess-rom-size.patch
|
Patch0: 0000-libpciaccess-rom-size.patch
|
||||||
Patch1: 0001-libpciaccess-add-sw64.patch
|
Patch1: 0001-linux-Set-number-of-devices-to-0-in-case-of-error.patch
|
||||||
|
|
||||||
BuildRequires: autoconf automake libtool pkgconfig xorg-x11-util-macros
|
BuildRequires: autoconf automake libtool pkgconfig git xorg-x11-util-macros
|
||||||
Requires: hwdata
|
Requires: hwdata
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -28,7 +28,7 @@ Requires: pkgconfig
|
|||||||
This package contains the development headers for the library.
|
This package contains the development headers for the library.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{name}-%{version} -p1
|
%autosetup -Sgit -n %{name}-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --disable-static
|
%configure --disable-static
|
||||||
@ -55,18 +55,6 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Jan 16 2023 lvfei<lvfei@kylinos.cn> - 0.17-1
|
|
||||||
- update to 0.17
|
|
||||||
|
|
||||||
* Thu Jul 28 2022 wuzx<wuzx1226@qq.com> - 0.16-3
|
|
||||||
- add sw64 patch
|
|
||||||
|
|
||||||
* Fri Jul 30 2021 chenyanpanHW <chenyanpan@huawei.com> - 0.16-2
|
|
||||||
- DESC: delete -Sgit from %autosetup, and delete BuildRequires git
|
|
||||||
|
|
||||||
* Wed Jul 15 2020 Zhiqiang Liu <lzhq28@mail.ustc.edu.cn> - 0.16-1
|
|
||||||
- update to v0.16 version
|
|
||||||
|
|
||||||
* Wed Jul 1 2020 Wu Bo <wubo009@163.com> - 0.14-2.4
|
* Wed Jul 1 2020 Wu Bo <wubo009@163.com> - 0.14-2.4
|
||||||
- rebuild package
|
- rebuild package
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +0,0 @@
|
|||||||
version_control: git
|
|
||||||
src_repo: https://gitlab.freedesktop.org/xorg/lib/libpciaccess.git
|
|
||||||
tag_prefix: "libpciaccess-"
|
|
||||||
seperator: "."
|
|
||||||
Loading…
x
Reference in New Issue
Block a user