[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1/3] Check for Linux USBFS in configure
From: |
Cortland Tölva |
Subject: |
[Qemu-devel] [PATCH 1/3] Check for Linux USBFS in configure |
Date: |
Wed, 19 Sep 2018 01:04:19 -0700 |
In preparation for adding user mode emulation support for the
Linux usbfs interface, check for its kernel header.
Signed-off-by: Cortland Tölva <address@hidden>
---
configure | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index 58862d2ae8..5d36f45442 100755
--- a/configure
+++ b/configure
@@ -4235,7 +4235,23 @@ if compile_prog "" "" ; then
memfd=yes
fi
-
+# check for usbfs
+have_usbfs=no
+if test "$linux_user" = "yes"; then
+ cat > $TMPC << EOF
+#include <linux/usbdevice_fs.h>
+int main(void) {
+#if !defined(USBDEVFS_URB_TYPE_CONTROL)
+#error Missing usbdevfs defintions.
+#else
+ return 0;
+#endif
+}
+EOF
+ if compile_prog "" "" ; then
+ have_usbfs=yes
+ fi
+fi
# check for fallocate
fallocate=no
@@ -6346,6 +6362,9 @@ fi
if test "$memfd" = "yes" ; then
echo "CONFIG_MEMFD=y" >> $config_host_mak
fi
+if test "$have_usbfs" = "yes" ; then
+ echo "CONFIG_USBFS=y" >> $config_host_mak
+fi
if test "$fallocate" = "yes" ; then
echo "CONFIG_FALLOCATE=y" >> $config_host_mak
fi
--
2.11.0
[Qemu-devel] [PATCH 2/3] Linux user mode usbfs types and defs., Cortland Tölva, 2018/09/19
[Qemu-devel] [PATCH 3/3] linux-user: implement special usbfs ioctls., Cortland Tölva, 2018/09/19