]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
storagefile: conditional build of virStorageFileLoadBackendModule
authorDaniel P. Berrangé <berrange@redhat.com>
Thu, 3 May 2018 14:42:59 +0000 (15:42 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Thu, 3 May 2018 14:42:59 +0000 (15:42 +0100)
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>
src/util/virstoragefilebackend.c

index ac087dabacd1059619525b32b0e5b25a957b4e2c..eb3055ed67e4c644060ea9f330e5b28083d2b023 100644 (file)
@@ -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)
 {