Don't use g_memdup() which is removed in newer versions of GLib. See . 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; } 2021-03-23Add powerpc64le-linux as a supported Guix architecture....Chris Marusich 2021-03-17maint: Check whether Guile-zlib is recent enough....Ludovic Courtès 2021-02-04build: Add '--with-channel-commit' and related configure flags....Ludovic Courtès 2020-12-11maint: Avoid macros obsolete in Autoconf 2.70....Ludovic Courtès 2020-10-22git: Require Guile-Git 0.3.0 or later....Ludovic Courtès 2020-09-08Remove (guix json) and require Guile-JSON 4.3.0+....Ludovic Courtès 2020-08-29build: Remove check for Guile 2.2.1 bug....Ludovic Courtès 2020-08-24Use "guile-zlib" and "guile-lzlib" instead of (guix config)....Mathieu Othacehe 2020-07-20ssh: Speed up RPCs by using #:nodelay....Lars-Dominik Braun 2020-05-28doc: Remove explicit support for mips64el-linux....Efraim Flashner 2020-05-28maint: Check whether Guile-Gcrypt is recent enough....Ludovic Courtès 2020-02-22build: Depend on guile-ssh 0.12.0...Lars-Dominik Braun 2019-08-17build: 'GUIX_CHECK_GUILE_JSON' really checks for Guile-JSON 3.x....Ludovic Courtès 2019-07-25maint: Switch to Guile-JSON 3.x....Ludovic Courtès 2019-05-06Add (guix lzlib)....