[libvirt] [PATCH] storagefile: conditional build of virStorageFileLoadBackendModule

Daniel P. Berrangé posted 1 patch 5 years, 10 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20180503151016.30125-1-berrange@redhat.com
Test syntax-check passed
src/util/virstoragefilebackend.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
[libvirt] [PATCH] storagefile: conditional build of virStorageFileLoadBackendModule
Posted by Daniel P. Berrangé 5 years, 10 months ago
The virStorageFileLoadBackendModule method is only used if either
fs or gluster storage is built in, which doesn't happen on mingw
leading to warning of an unused static function.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---

Pushed as mingw build fix

 src/util/virstoragefilebackend.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/util/virstoragefilebackend.c b/src/util/virstoragefilebackend.c
index ac087dabac..eb3055ed67 100644
--- a/src/util/virstoragefilebackend.c
+++ b/src/util/virstoragefilebackend.c
@@ -45,7 +45,9 @@ VIR_LOG_INIT("storage.storage_source_backend");
 static virStorageFileBackendPtr virStorageFileBackends[VIR_STORAGE_BACKENDS_MAX];
 static size_t virStorageFileBackendsCount;
 
-#define STORAGE_FILE_MODULE_DIR LIBDIR "/libvirt/storage-file"
+#if WITH_STORAGE_DIR || WITH_STORAGE_FS || WITH_STORAGE_GLUSTER
+
+# define STORAGE_FILE_MODULE_DIR LIBDIR "/libvirt/storage-file"
 
 static int
 virStorageFileLoadBackendModule(const char *name,
@@ -69,7 +71,7 @@ virStorageFileLoadBackendModule(const char *name,
 
     return ret;
 }
-
+#endif /* WITH_STORAGE_DIR || WITH_STORAGE_FS || WITH_STORAGE_GLUSTER */
 
 static int virStorageFileBackendOnceInit(void)
 {
-- 
2.14.3

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list