Index: gpu/config/gpu_info_collector_linux.cc |
diff --git a/gpu/config/gpu_info_collector_linux.cc b/gpu/config/gpu_info_collector_linux.cc |
index 9a21a2de09347b03b50b30c200447a61e8e39811..061fe35929e5acf5019dc2e5e6a0624332fadeed 100644 |
--- a/gpu/config/gpu_info_collector_linux.cc |
+++ b/gpu/config/gpu_info_collector_linux.cc |
@@ -17,13 +17,16 @@ |
#include "base/strings/string_tokenizer.h" |
#include "base/strings/string_util.h" |
#include "gpu/config/gpu_info_collector.h" |
-#include "library_loaders/libpci.h" |
#include "ui/gl/gl_bindings.h" |
#include "ui/gl/gl_context.h" |
#include "ui/gl/gl_implementation.h" |
#include "ui/gl/gl_surface.h" |
#include "ui/gl/gl_switches.h" |
+#if defined(USE_LIBPCI) |
+#include "library_loaders/libpci.h" |
+#endif |
+ |
namespace gpu { |
namespace { |
@@ -72,6 +75,10 @@ const uint32 kVendorIDAMD = 0x1002; |
CollectInfoResult CollectPCIVideoCardInfo(GPUInfo* gpu_info) { |
DCHECK(gpu_info); |
+#if !defined(USE_LIBPCI) |
+ return kCollectInfoNonFatalFailure; |
+#else |
+ |
if (IsPciSupported() == false) { |
VLOG(1) << "PCI bus scanning is not supported"; |
return kCollectInfoNonFatalFailure; |
@@ -144,6 +151,7 @@ CollectInfoResult CollectPCIVideoCardInfo(GPUInfo* gpu_info) { |
if (!primary_gpu_identified) |
return kCollectInfoNonFatalFailure; |
return kCollectInfoSuccess; |
+#endif |
} |
} // namespace anonymous |