[libvirt] [PATCH] locking: fix build with older sanlock

Ján Tomko posted 1 patch 4 years, 5 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/54dd0938375daaa68674b271f444b312d6684b01.1573635188.git.jtomko@redhat.com
src/locking/lock_driver_sanlock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[libvirt] [PATCH] locking: fix build with older sanlock
Posted by Ján Tomko 4 years, 5 months ago
../../src/locking/lock_driver_sanlock.c:106:17: error: incompatible pointer types
assigning to 'char **' from 'char *' [-Werror,-Wincompatible-pointer-types]
        message = g_strdup_printf(_("sanlock error %d"), err);
                ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fixes: b1d58418aa5051c7aafa4519b332007e7c73c261

Signed-off-by: Ján Tomko <jtomko@redhat.com>
---
 src/locking/lock_driver_sanlock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Pushed as a build breaker fix.

diff --git a/src/locking/lock_driver_sanlock.c b/src/locking/lock_driver_sanlock.c
index 87ba0fbfbb..c8936c301c 100644
--- a/src/locking/lock_driver_sanlock.c
+++ b/src/locking/lock_driver_sanlock.c
@@ -103,7 +103,7 @@ virLockManagerSanlockError(int err,
 #if HAVE_SANLOCK_STRERROR
         *message = g_strdup(sanlock_strerror(err));
 #else
-        message = g_strdup_printf(_("sanlock error %d"), err);
+        *message = g_strdup_printf(_("sanlock error %d"), err);
 #endif
         return true;
     } else {
-- 
2.21.0

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