summaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/i3status-rust-enable-unstable-features.patch20
-rw-r--r--gnu/packages/patches/libblockdev-glib-compat.patch61
2 files changed, 20 insertions, 61 deletions
diff --git a/gnu/packages/patches/i3status-rust-enable-unstable-features.patch b/gnu/packages/patches/i3status-rust-enable-unstable-features.patch
new file mode 100644
index 0000000000..535b45d865
--- /dev/null
+++ b/gnu/packages/patches/i3status-rust-enable-unstable-features.patch
@@ -0,0 +1,20 @@
+From 3006390c0058f06c255d9850327163aebcdc3b40 Mon Sep 17 00:00:00 2001
+From: Petr Hodina <phodina@protonmail.com>
+Date: Mon, 11 Oct 2021 22:35:39 +0200
+Subject: [PATCH] Enable unstable features.
+
+
+diff --git a/src/main.rs b/src/main.rs
+index d9e964b..820e22e 100644
+--- a/src/main.rs
++++ b/src/main.rs
+@@ -1,3 +1,6 @@
++#![feature(bool_to_option)]
++#![feature(clamp)]
++
+ #[macro_use]
+ mod de;
+ #[macro_use]
+--
+2.33.0
+
diff --git a/gnu/packages/patches/libblockdev-glib-compat.patch b/gnu/packages/patches/libblockdev-glib-compat.patch
deleted file mode 100644
index bb25d5d963..0000000000
--- a/gnu/packages/patches/libblockdev-glib-compat.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-Don't use g_memdup() which is removed in newer versions of GLib.
-
-See <https://github.com/storaged-project/libblockdev/pull/623>.
-
-Taken from upstream:
-https://github.com/storaged-project/libblockdev/commit/5528baef6ccc835a06c45f9db34a2c9c3f2dd940
-
-diff --git a/src/lib/plugin_apis/vdo.api b/src/lib/plugin_apis/vdo.api
---- a/src/lib/plugin_apis/vdo.api
-+++ b/src/lib/plugin_apis/vdo.api
-@@ -170,7 +170,22 @@ void bd_vdo_stats_free (BDVDOStats *stats) {
- * Deprecated: 2.24: Use LVM-VDO integration instead.
- */
- BDVDOStats* bd_vdo_stats_copy (BDVDOStats *stats) {
-- return g_memdup (stats, sizeof (BDVDOStats));
-+ if (stats == NULL)
-+ return NULL;
-+
-+ BDVDOStats *new_stats = g_new0 (BDVDOStats, 1);
-+
-+ new_stats->block_size = stats->block_size;
-+ new_stats->logical_block_size = stats->logical_block_size;
-+ new_stats->physical_blocks = stats->physical_blocks;
-+ new_stats->data_blocks_used = stats->data_blocks_used;
-+ new_stats->overhead_blocks_used = stats->overhead_blocks_used;
-+ new_stats->logical_blocks_used = stats->logical_blocks_used;
-+ new_stats->used_percent = stats->used_percent;
-+ new_stats->saving_percent = stats->saving_percent;
-+ new_stats->write_amplification_ratio = stats->write_amplification_ratio;
-+
-+ return new_stats;
- }
-
- GType bd_vdo_stats_get_type () {
-diff --git a/src/plugins/vdo.c b/src/plugins/vdo.c
---- a/src/plugins/vdo.c
-+++ b/src/plugins/vdo.c
-@@ -81,7 +81,22 @@ void bd_vdo_stats_free (BDVDOStats *stats) {
- }
-
- BDVDOStats* bd_vdo_stats_copy (BDVDOStats *stats) {
-- return g_memdup (stats, sizeof (BDVDOStats));
-+ if (stats == NULL)
-+ return NULL;
-+
-+ BDVDOStats *new_stats = g_new0 (BDVDOStats, 1);
-+
-+ new_stats->block_size = stats->block_size;
-+ new_stats->logical_block_size = stats->logical_block_size;
-+ new_stats->physical_blocks = stats->physical_blocks;
-+ new_stats->data_blocks_used = stats->data_blocks_used;
-+ new_stats->overhead_blocks_used = stats->overhead_blocks_used;
-+ new_stats->logical_blocks_used = stats->logical_blocks_used;
-+ new_stats->used_percent = stats->used_percent;
-+ new_stats->saving_percent = stats->saving_percent;
-+ new_stats->write_amplification_ratio = stats->write_amplification_ratio;
-+
-+ return new_stats;
- }
-
-