configure.ac | 10 +++++++--- src/common_init.c | 4 +++- src/common_vgaarb.c | 5 ++++- src/freebsd_pci.c | 5 ++++- src/linux_sysfs.c | 6 ++++-- src/netbsd_pci.c | 8 ++++---- src/pciaccess_private.h | 2 +- 7 files changed, 27 insertions(+), 13 deletions(-)
New commits: commit bbd1acdd1d25b9a68f4b7913a4094af20d7cf78f Author: Alan Coopersmith <[email protected]> Date: Thu Apr 30 21:44:41 2015 -0700 libpciaccess 0.13.4 Signed-off-by: Alan Coopersmith <[email protected]> diff --git a/configure.ac b/configure.ac index f94fa15..e67e9e1 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) -AC_INIT([libpciaccess],[0.13.3], +AC_INIT([libpciaccess],[0.13.4], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=libpciaccess],[libpciaccess]) AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS([config.h]) commit d0c53bdc0b35a5416fc30a610b7401978871a5f1 Author: Tobias Nygren <[email protected]> Date: Mon Feb 16 10:22:35 2015 +0100 Bug 89151: Fix build on NetBSD/alpha and NetBSD/sparc64. This patch is required for building on NetBSD/alpha (needs platform specific -lalpha) and NetBSD/sparc64 (no platform specific library, just -lpci). The patch also generalizes to support all NetBSD platforms with pci bus. https://bugs.freedesktop.org/show_bug.cgi?id=89151 Reviewed-by: Alan Coopersmith <[email protected]> Signed-off-by: Thomas Klausner <[email protected]> diff --git a/configure.ac b/configure.ac index f11204f..f94fa15 100644 --- a/configure.ac +++ b/configure.ac @@ -77,12 +77,16 @@ case $host_os in *netbsd*) case $host in *i[3-9]86*) - PCIACCESS_LIBS="$PCIACCESS_LIBS -li386 -lpci" + PCIACCESS_LIBS="$PCIACCESS_LIBS -li386" ;; *x86_64*|*amd64*) - PCIACCESS_LIBS="$PCIACCESS_LIBS -lx86_64 -lpci" + PCIACCESS_LIBS="$PCIACCESS_LIBS -lx86_64" + ;; + *alpha*) + PCIACCESS_LIBS="$PCIACCESS_LIBS -lalpha" ;; esac + PCIACCESS_LIBS="$PCIACCESS_LIBS -lpci" netbsd=yes ;; *openbsd*) commit 1972e9223764618aedc5adc32b64b2c043d1b826 Author: Eero Tamminen <[email protected]> Date: Tue Feb 10 14:55:22 2015 +0000 Check for __linux__ instead of linux during compilation "__linux__" is the POSIX define for checking for Linux OS, "linux" is deprecated and apparently not supported by Android. Besides correcting the define, patch adds error for the case OS isn't recognized. Signed-off-by: Eero Tamminen <[email protected]> v2: Drop double negative from commit msg. Spotted by Mateusz Jończyk. [Emil Velikov: Remove irrelevant Android details from commit msg.] Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jasper St. Pierre <[email protected]> Signed-off-by: Alan Coopersmith <[email protected]> diff --git a/src/common_init.c b/src/common_init.c index a127a8b..b1c0c3e 100644 --- a/src/common_init.c +++ b/src/common_init.c @@ -52,7 +52,7 @@ pci_system_init( void ) { int err = ENOSYS; -#ifdef linux +#ifdef __linux__ err = pci_system_linux_sysfs_create(); #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) err = pci_system_freebsd_create(); @@ -64,6 +64,8 @@ pci_system_init( void ) err = pci_system_solx_devfs_create(); #elif defined(__GNU__) || defined(__CYGWIN__) err = pci_system_x86_create(); +#else +# error "Unsupported OS" #endif return err; commit ed340abc37b07cb9fc788ae77d837088c54cd16a Author: Emil Velikov <[email protected]> Date: Tue Feb 10 14:55:21 2015 +0000 Include config.h before any other headers. The former has a series of defines which in some cases are crusial to be set before including any system headers. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Alan Coopersmith <[email protected]> Signed-off-by: Alan Coopersmith <[email protected]> diff --git a/src/common_vgaarb.c b/src/common_vgaarb.c index b2e1d8a..7a7d204 100644 --- a/src/common_vgaarb.c +++ b/src/common_vgaarb.c @@ -25,6 +25,10 @@ * */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <stdio.h> #include <string.h> #include <unistd.h> @@ -33,10 +37,6 @@ #include <stdlib.h> #include <limits.h> -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include "pciaccess.h" #include "pciaccess_private.h" diff --git a/src/freebsd_pci.c b/src/freebsd_pci.c index a9304de..f9c1476 100644 --- a/src/freebsd_pci.c +++ b/src/freebsd_pci.c @@ -33,6 +33,10 @@ * \author Eric Anholt <[email protected]> */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <stdlib.h> #include <stdio.h> #include <string.h> @@ -45,10 +49,6 @@ #include <sys/mman.h> #include <sys/memrange.h> -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include "pciaccess.h" #include "pciaccess_private.h" diff --git a/src/linux_sysfs.c b/src/linux_sysfs.c index 08c9971..50d94cf 100644 --- a/src/linux_sysfs.c +++ b/src/linux_sysfs.c @@ -34,6 +34,10 @@ #define _GNU_SOURCE +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <stdlib.h> #include <string.h> #include <stdio.h> @@ -57,10 +61,6 @@ #define iopl(x) -1 #endif -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #ifdef HAVE_MTRR #include <asm/mtrr.h> #include <sys/ioctl.h> diff --git a/src/netbsd_pci.c b/src/netbsd_pci.c index 52591b0..f972f94 100644 --- a/src/netbsd_pci.c +++ b/src/netbsd_pci.c @@ -16,15 +16,15 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <sys/param.h> #include <sys/ioctl.h> #include <sys/mman.h> #include <sys/types.h> -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #ifdef HAVE_MTRR #include <machine/sysarch.h> #include <machine/mtrr.h> commit 6329ef9e5d6f36ca3f7258279f6640037b71926a Author: Chih-Wei Huang <[email protected]> Date: Tue Feb 10 14:55:20 2015 +0000 Add missing guards around config.h inclusion In some cases the header may not exist, leading to compilation issues. Add the ifdef HAVE_CONFIG_H, as it is those in other parts of the project. [Emil Velikov: Split out from a larger commit, rework commit message] Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Alan Coopersmith <[email protected]> Signed-off-by: Alan Coopersmith <[email protected]> diff --git a/src/common_vgaarb.c b/src/common_vgaarb.c index ab3c5e8..b2e1d8a 100644 --- a/src/common_vgaarb.c +++ b/src/common_vgaarb.c @@ -33,7 +33,10 @@ #include <stdlib.h> #include <limits.h> +#ifdef HAVE_CONFIG_H #include "config.h" +#endif + #include "pciaccess.h" #include "pciaccess_private.h" diff --git a/src/freebsd_pci.c b/src/freebsd_pci.c index 7f5f56b..a9304de 100644 --- a/src/freebsd_pci.c +++ b/src/freebsd_pci.c @@ -45,7 +45,10 @@ #include <sys/mman.h> #include <sys/memrange.h> +#ifdef HAVE_CONFIG_H #include "config.h" +#endif + #include "pciaccess.h" #include "pciaccess_private.h" diff --git a/src/linux_sysfs.c b/src/linux_sysfs.c index 8fca65e..08c9971 100644 --- a/src/linux_sysfs.c +++ b/src/linux_sysfs.c @@ -57,7 +57,9 @@ #define iopl(x) -1 #endif +#ifdef HAVE_CONFIG_H #include "config.h" +#endif #ifdef HAVE_MTRR #include <asm/mtrr.h> commit e42ee2a075a8b7c62b190815be42ea26c9d8c03f Author: Emil Velikov <[email protected]> Date: Tue Feb 10 14:55:19 2015 +0000 Include the POSIX fcntl.h instead of sys/fcntl.h The former is part of the POSIX standard, and (unlike the latter) is more widely available. v2: Drop gracious d in header name. Spotted by Alan. Cc: Adam Jackson <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Alan Coopersmith <[email protected]> Signed-off-by: Alan Coopersmith <[email protected]> diff --git a/src/pciaccess_private.h b/src/pciaccess_private.h index 9f4e8f9..2f05b29 100644 --- a/src/pciaccess_private.h +++ b/src/pciaccess_private.h @@ -42,7 +42,7 @@ * know of any OS we support where this isn't available in a sufficiently * new version, so warn unconditionally. */ -#include <sys/fcntl.h> +#include <fcntl.h> #ifndef O_CLOEXEC #warning O_CLOEXEC not available, please upgrade. -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: https://lists.debian.org/[email protected]

