aboutsummaryrefslogtreecommitdiffstats
path: root/community/ostree/fix-format-string.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/ostree/fix-format-string.patch')
-rw-r--r--community/ostree/fix-format-string.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/community/ostree/fix-format-string.patch b/community/ostree/fix-format-string.patch
new file mode 100644
index 0000000000..3bbbe434d7
--- /dev/null
+++ b/community/ostree/fix-format-string.patch
@@ -0,0 +1,31 @@
+Without this patch the build fails with the following gcc error:
+
+src/libostree/ostree-repo-commit.c: In function 'write_content_object':
+src/libostree/ostree-repo-commit.c:906:62: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'guint64 {aka long long unsigned int}' [-Werror=format=]
+ return glnx_throw (error, "min-free-space-size %luMB would be exceeded, %s more required",
+
+src/libostree/ostree-repo-commit.c: In function 'ostree_repo_prepare_transaction':
+src/libostree/ostree-repo-commit.c:1620:62: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'guint64 {aka long long unsigned int}' [-Werror=format=]
+ return glnx_throw (error, "min-free-space-size %luMB would be exceeded, %s available",
+
+diff -upr libostree-2018.6.orig/src/libostree/ostree-repo-commit.c libostree-2018.6/src/libostree/ostree-repo-commit.c
+--- libostree-2018.6.orig/src/libostree/ostree-repo-commit.c 2018-06-30 21:51:20.208924241 +0200
++++ libostree-2018.6/src/libostree/ostree-repo-commit.c 2018-06-30 21:52:12.019151826 +0200
+@@ -903,7 +903,7 @@ write_content_object (OstreeRepo
+ return glnx_throw (error, "min-free-space-percent '%u%%' would be exceeded, %s more required",
+ self->min_free_space_percent, formatted_required);
+ else
+- return glnx_throw (error, "min-free-space-size %luMB would be exceeded, %s more required",
++ return glnx_throw (error, "min-free-space-size %" G_GUINT64_FORMAT "MB would be exceeded, %s more required",
+ self->min_free_space_mb, formatted_required);
+ }
+ /* This is the main bit that needs mutex protection */
+@@ -1617,7 +1617,7 @@ ostree_repo_prepare_transaction (OstreeR
+ return glnx_throw (error, "min-free-space-percent '%u%%' would be exceeded, %s available",
+ self->min_free_space_percent, formatted_free);
+ else
+- return glnx_throw (error, "min-free-space-size %luMB would be exceeded, %s available",
++ return glnx_throw (error, "min-free-space-size %" G_GUINT64_FORMAT "MB would be exceeded, %s available",
+ self->min_free_space_mb, formatted_free);
+ }
+ g_mutex_unlock (&self->txn_lock);