From: Chih-Wei Huang <cwhu...@linux.org.tw> 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 <emil.l.veli...@gmail.com> Reviewed-by: Alan Coopersmith <alan.coopersm...@oracle.com> --- src/common_vgaarb.c | 3 +++ src/freebsd_pci.c | 3 +++ src/linux_sysfs.c | 2 ++ 3 files changed, 8 insertions(+) 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> -- 2.2.2 _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel