[Spice-commits] 2 commits - configure.ac meson.build src/channel-usbredir.c src/win-usb-dev.c
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Mar 18 16:37:14 UTC 2019
configure.ac | 2 +-
meson.build | 6 ++++--
src/channel-usbredir.c | 6 ------
src/win-usb-dev.c | 4 +---
4 files changed, 6 insertions(+), 12 deletions(-)
New commits:
commit 6714417d5fa43582dacf256bdd32fe870a2139d4
Author: Victor Toso <me at victortoso.com>
Date: Fri Feb 22 16:17:19 2019 +0000
win-usb-dev: remove ifdef for libusb on 1.0.13
We already require libusb 1.0.16 or above since 8269a5be62f4ce1
(build-sys: drop support for libusb < 1.0.16)
Signed-off-by: Victor Toso <victortoso at redhat.com>
Acked-by: Christophe Fergeau <cfergeau at redhat.com>
diff --git a/src/win-usb-dev.c b/src/win-usb-dev.c
index 327976d..964719c 100644
--- a/src/win-usb-dev.c
+++ b/src/win-usb-dev.c
@@ -570,9 +570,7 @@ static gboolean g_udev_skip_search(GUdevDevice *udev)
g_return_val_if_fail(udevinfo != NULL, FALSE);
skip = ((udevinfo->addr == 0xff) || /* root hub (HCD) */
-#if defined(LIBUSBX_API_VERSION) && (LIBUSBX_API_VERSION >= 0x010000FF)
- (udevinfo->addr == 1) || /* root hub addr for libusbx >= 1.0.13 */
-#endif
+ (udevinfo->addr == 1) || /* root hub addr */
(udevinfo->class == LIBUSB_CLASS_HUB) || /* hub*/
(udevinfo->addr == 0)); /* bad address */
return skip;
commit 0d2d08fcf86c8b637fe3ec78b0279d356569c0cc
Author: Victor Toso <me at victortoso.com>
Date: Fri Feb 22 15:54:05 2019 +0000
build-sys: require usbredir 0.7.1 or above
usbredir-0.7.1 was released on 29-Oct-2015, relatively old compared to
most recent usbredir-0.8.0 from 03-Aug-2018.
* Debian 9 (stretch) -> 0.7.1
* Fedora 21 to Fedora 27 -> 0.7.1
* Fedora 28 to rawhide -> 0.8.0
Signed-off-by: Victor Toso <victortoso at redhat.com>
Acked-by: Christophe Fergeau <cfergeau at redhat.com>
diff --git a/configure.ac b/configure.ac
index 2e6f7e7..d234822 100644
--- a/configure.ac
+++ b/configure.ac
@@ -282,7 +282,7 @@ if test "x$enable_usbredir" = "xno"; then
have_usbredir="no"
else
PKG_CHECK_MODULES([USBREDIR],
- [libusb-1.0 >= 1.0.16 libusbredirhost libusbredirparser-0.5],
+ [libusb-1.0 >= 1.0.16 libusbredirhost >= 0.7.1 libusbredirparser-0.5 >= 0.7.1],
[have_usbredir=yes],
[have_usbredir=no])
if test "x$have_usbredir" = "xno" && test "x$enable_usbredir" = "xyes"; then
diff --git a/meson.build b/meson.build
index a707ad2..e0fba93 100644
--- a/meson.build
+++ b/meson.build
@@ -185,8 +185,10 @@ endif
# usbredir
spice_gtk_has_usbredir = false
-d1 = dependency('libusbredirparser-0.5', required : get_option('usbredir'))
-d2 = dependency('libusbredirhost', version : '>= 0.4.2', required : get_option('usbredir'))
+usbredir_version = '0.7.1'
+usbredir_version_info = '>= @0@'.format(usbredir_version)
+d1 = dependency('libusbredirparser-0.5', version: usbredir_version_info, required : get_option('usbredir'))
+d2 = dependency('libusbredirhost', version: usbredir_version_info, required : get_option('usbredir'))
d3 = dependency('libusb-1.0', version : '>= 1.0.16', required : get_option('usbredir'))
if d1.found() and d2.found() and d3.found()
spice_glib_deps += [d1, d2, d3]
diff --git a/src/channel-usbredir.c b/src/channel-usbredir.c
index 182edc4..3562164 100644
--- a/src/channel-usbredir.c
+++ b/src/channel-usbredir.c
@@ -94,9 +94,7 @@ static void usbredir_log(void *user_data, int level, const char *msg);
static int usbredir_read_callback(void *user_data, uint8_t *data, int count);
static int usbredir_write_callback(void *user_data, uint8_t *data, int count);
static void usbredir_write_flush_callback(void *user_data);
-#if USBREDIR_VERSION >= 0x000701
static uint64_t usbredir_buffered_output_size_callback(void *user_data);
-#endif
static void *usbredir_alloc_lock(void);
static void usbredir_lock_lock(void *user_data);
@@ -286,9 +284,7 @@ void spice_usbredir_channel_set_context(SpiceUsbredirChannel *channel,
if (!priv->host)
g_error("Out of memory allocating usbredirhost");
-#if USBREDIR_VERSION >= 0x000701
usbredirhost_set_buffered_output_size_cb(priv->host, usbredir_buffered_output_size_callback);
-#endif
#ifdef USE_LZ4
spice_channel_set_capability(channel, SPICE_SPICEVMC_CAP_DATA_COMPRESS_LZ4);
#endif
@@ -589,13 +585,11 @@ void spice_usbredir_channel_get_guest_filter(
/* ------------------------------------------------------------------ */
/* callbacks (any context) */
-#if USBREDIR_VERSION >= 0x000701
static uint64_t usbredir_buffered_output_size_callback(void *user_data)
{
g_return_val_if_fail(SPICE_IS_USBREDIR_CHANNEL(user_data), 0);
return spice_channel_get_queue_size(SPICE_CHANNEL(user_data));
}
-#endif
/* Note that this function must be re-entrant safe, as it can get called
from both the main thread as well as from the usb event handling thread */
More information about the Spice-commits
mailing list