From 5d80469de01bfe91378edbe50d12b1ecdd7a9d1f Mon Sep 17 00:00:00 2001
From: Julien Grall <julien.grall@linaro.org>
Date: Tue, 14 Jan 2014 01:41:12 +0000
Subject: [PATCH 21/48] xen/gnttab: Add a guard for xenpci functions

On ARM, the xenpci doesn't exist. Add guard to call xenpci function only
if the device is enabled.
---
 sys/conf/options | 4 ++++
 sys/xen/gnttab.c | 1 +
 2 files changed, 5 insertions(+)

diff --git a/sys/conf/options b/sys/conf/options
index ae0f852..18cf640 100644
--- a/sys/conf/options
+++ b/sys/conf/options
@@ -930,3 +930,7 @@ RCTL		opt_global.h
 RANDOM_YARROW	opt_random.h
 RANDOM_FORTUNA	opt_random.h
 RANDOM_DEBUG	opt_random.h
+RANDOM_RWFILE	opt_random.h
+
+# Xen
+DEV_XENPCI	opt_xen.h
diff --git a/sys/xen/gnttab.c b/sys/xen/gnttab.c
index fec7e36..06f0fbc 100644
--- a/sys/xen/gnttab.c
+++ b/sys/xen/gnttab.c
@@ -14,6 +14,7 @@
 __FBSDID("$FreeBSD$");
 
 #include "opt_pmap.h"
+#include "opt_xen.h"
 
 #include <sys/param.h>
 #include <sys/systm.h>
-- 
2.1.0

