Fixup for arm losing <sys/io.h>

This commit is contained in:
Adam Jackson 2019-07-11 13:33:58 -04:00
parent 98bce0d6d1
commit 37da3a982d
2 changed files with 32 additions and 5 deletions

View File

@ -0,0 +1,27 @@
From 1d71669e577f5f2eb02542851696d3bcb722a80b Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Thu, 11 Jul 2019 12:56:40 -0400
Subject: [PATCH libpciaccess] linux: Don't try to include <sys/io.h> on arm
It no longer exists in newer glibc, and didn't work like you'd have
hoped on anything but strongarm anyway.
---
src/linux_sysfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/linux_sysfs.c b/src/linux_sysfs.c
index e74ad72..d022644 100644
--- a/src/linux_sysfs.c
+++ b/src/linux_sysfs.c
@@ -50,7 +50,7 @@
#include <dirent.h>
#include <errno.h>
-#if defined(__i386__) || defined(__x86_64__) || defined(__arm__)
+#if defined(__i386__) || defined(__x86_64__)
#include <sys/io.h>
#else
#define inb(x) -1
--
2.21.0

View File

@ -1,6 +1,3 @@
#define gitdate 20140411
#define gitrev b9c068896914b4132a24839c9ef7f9fcd6282d88
Name: libpciaccess
Version: 0.15
Release: 1%{?dist}
@ -15,6 +12,10 @@ URL: https://www.x.org/
Source0: https://www.x.org/archive/individual/lib/%{name}-%{version}.tar.bz2
Source1: make-libpciaccess-snapshot.sh
# https://gitlab.freedesktop.org/xorg/lib/libpciaccess/merge_requests/7
# will be in 0.16
Patch0: 0001-linux-Don-t-try-to-include-sys-io.h-on-arm.patch
Patch2: libpciaccess-rom-size.patch
BuildRequires: autoconf automake libtool pkgconfig xorg-x11-util-macros
@ -33,8 +34,7 @@ Requires: pkgconfig
Development package for libpciaccess.
%prep
%setup -q -n %{name}-%{?gitdate:%{gitdate}}%{!?gitdate:%{version}}
%patch2 -p1 -b .rom-size
%autosetup -p1
%build
autoreconf -v --install