[Spice-devel] [PATCH v8 13/20] build: Do not build usbredir dependent file if usbredir is disabled
Victor Toso
victortoso at redhat.com
Thu Sep 19 14:11:26 UTC 2019
From: Frediano Ziglio <fziglio at redhat.com>
These files would end up to compile empty code, no reason
to compile and link them.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
src/meson.build | 10 +++++-----
src/usb-backend.c | 4 ----
src/usbutil.c | 3 ---
src/usbutil.h | 4 ----
4 files changed, 5 insertions(+), 16 deletions(-)
diff --git a/src/meson.build b/src/meson.build
index 00eb277..0461dea 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -119,11 +119,6 @@ spice_client_glib_sources = [
'spice-uri-priv.h',
'spice-util-priv.h',
'usb-device-manager-priv.h',
- 'usbutil.c',
- 'usbutil.h',
- 'usb-backend.c',
- 'usb-emulation.h',
- 'usb-backend.h',
'vmcstream.c',
'vmcstream.h',
]
@@ -159,6 +154,11 @@ endif
if spice_gtk_has_usbredir
spice_client_glib_sources += [
+ 'usbutil.c',
+ 'usbutil.h',
+ 'usb-backend.c',
+ 'usb-emulation.h',
+ 'usb-backend.h',
'usb-device-cd.c',
'usb-device-cd.h',
'cd-scsi.c',
diff --git a/src/usb-backend.c b/src/usb-backend.c
index a51c545..d31b341 100644
--- a/src/usb-backend.c
+++ b/src/usb-backend.c
@@ -22,8 +22,6 @@
#include "config.h"
-#ifdef USE_USBREDIR
-
#include <glib-object.h>
#include <inttypes.h>
#include <gio/gio.h>
@@ -1523,5 +1521,3 @@ spice_usb_backend_create_emulated_device(SpiceUsbBackend *be,
return TRUE;
}
-
-#endif /* USB_REDIR */
diff --git a/src/usbutil.c b/src/usbutil.c
index 5052ef3..aebed35 100644
--- a/src/usbutil.c
+++ b/src/usbutil.c
@@ -26,7 +26,6 @@
#include <ctype.h>
#include <stdlib.h>
-#ifdef USE_USBREDIR
#include <stdio.h>
#ifdef __linux__
#include <unistd.h>
@@ -275,8 +274,6 @@ void spice_usb_util_get_device_strings(int bus, int address,
}
}
-#endif
-
#ifdef USBUTIL_TEST
int main()
{
diff --git a/src/usbutil.h b/src/usbutil.h
index 6c570d9..2f683fa 100644
--- a/src/usbutil.h
+++ b/src/usbutil.h
@@ -21,8 +21,6 @@
#pragma once
#include <glib.h>
-
-#ifdef USE_USBREDIR
#include <libusb.h>
G_BEGIN_DECLS
@@ -32,5 +30,3 @@ void spice_usb_util_get_device_strings(int bus, int address,
gchar **manufacturer, gchar **product);
G_END_DECLS
-
-#endif /* USE_USBREDIR */
--
2.21.0
More information about the Spice-devel
mailing list