[PATCH] build: fix build on cygwin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Regression introduced when we changed types in commit 3e2c3d8f6.

We've done this sort of cleanup before (see commit c685993d7).

* src/conf/storage_conf.c (virStoragePoolDefFormat)
(virStorageVolTargetDefFormat): Cast gid_t and uid_t.
---

Pushing under the build-breaker rule.

 src/conf/storage_conf.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c
index bdf6218..2330fa1 100644
--- a/src/conf/storage_conf.c
+++ b/src/conf/storage_conf.c
@@ -915,10 +915,10 @@ virStoragePoolDefFormat(virStoragePoolDefPtr def) {
     virBufferAddLit(&buf,"    <permissions>\n");
     virBufferAsprintf(&buf,"      <mode>0%o</mode>\n",
                       def->target.perms.mode);
-    virBufferAsprintf(&buf,"      <owner>%d</owner>\n",
-                      def->target.perms.uid);
-    virBufferAsprintf(&buf,"      <group>%d</group>\n",
-                      def->target.perms.gid);
+    virBufferAsprintf(&buf,"      <owner>%u</owner>\n",
+                      (unsigned int) def->target.perms.uid);
+    virBufferAsprintf(&buf,"      <group>%u</group>\n",
+                      (unsigned int) def->target.perms.gid);

     if (def->target.perms.label)
         virBufferAsprintf(&buf,"      <label>%s</label>\n",
@@ -1152,10 +1152,10 @@ virStorageVolTargetDefFormat(virStorageVolOptionsPtr options,
     virBufferAddLit(buf,"    <permissions>\n");
     virBufferAsprintf(buf,"      <mode>0%o</mode>\n",
                       def->perms.mode);
-    virBufferAsprintf(buf,"      <owner>%d</owner>\n",
-                      def->perms.uid);
-    virBufferAsprintf(buf,"      <group>%d</group>\n",
-                      def->perms.gid);
+    virBufferAsprintf(buf,"      <owner>%u</owner>\n",
+                      (unsigned int) def->perms.uid);
+    virBufferAsprintf(buf,"      <group>%u</group>\n",
+                      (unsigned int) def->perms.gid);


     if (def->perms.label)
-- 
1.7.7.6

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


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]