On 2021-04-10 15:05 +0100, John Burrell via blfs-dev wrote: > Using the systemd version of the development book, libblockdev-2.25 gives: > > vdo.c: In function ‘bd_vdo_stats_copy’: > vdo.c:84:5: error: ‘g_memdup’ is deprecated: Use 'g_memdup2' instead > [-Werror=deprecated-declarations] > 84 | return g_memdup (stats, sizeof (BDVDOStats)); > | ^~~~~~ > In file included from /usr/include/glib-2.0/glib.h:82, > from vdo.c:20: > /usr/include/glib-2.0/glib/gstrfuncs.h:257:23: note: declared here > 257 | gpointer g_memdup (gconstpointer mem, > | ^~~~~~~~ > cc1: all warnings being treated as errors > > I didn't see a way to stop warnings being treated as errors in the > configure script. I tried -Wno-error=deprecated-declarations, but that > didn't work, so I added > > CFLAGS=-Wno-error > > to the configure command to allow it to compile.
sed 's/g_memdup/g_memdup2/' makes more sense. g_memdup is deprecated because using it may cause security issues and there is no way to fix without changing the API. -- Xi Ruoyao <xry...@mengyan1223.wang> School of Aerospace Science and Technology, Xidian University -- http://lists.linuxfromscratch.org/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page