The function uses libpciaccess, which is not present on Android. So, make it a no-op that returns 0. Signed-off-by: Chad Versace <chad.versace at linux.intel.com> --- intel/intel_bufmgr.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/intel/intel_bufmgr.c b/intel/intel_bufmgr.c index 905556f..d80b00e 100644 --- a/intel/intel_bufmgr.c +++ b/intel/intel_bufmgr.c @@ -36,11 +36,14 @@ #include <errno.h> #include <drm.h> #include <i915_drm.h> -#include <pciaccess.h> #include "intel_bufmgr.h" #include "intel_bufmgr_priv.h" #include "xf86drm.h" +#ifndef ANDROID +#include <pciaccess.h> +#endif + /** @file intel_bufmgr.c * * Convenience functions for buffer management methods. @@ -275,6 +278,10 @@ int drm_intel_get_pipe_from_crtc_id(drm_intel_bufmgr *bufmgr, int crtc_id) static size_t drm_intel_probe_agp_aperture_size(int fd) { +#ifdef ANDROID + /* Android does not have libpciaccess. */ + return 0; +#else struct pci_device *pci_dev; size_t size = 0; int ret; @@ -296,6 +303,7 @@ drm_intel_probe_agp_aperture_size(int fd) err: pci_system_cleanup (); return size; +#endif } int drm_intel_get_aperture_sizes(int fd, -- 1.7.7.4