From 4f76c9bd43dd7ff8108ffe81c690fe3e6232ee6a Mon Sep 17 00:00:00 2001 From: Michael Swiger Date: Sun, 29 Aug 2021 13:11:04 -0700 Subject: [PATCH] Only use g_memdup2 for glib >= 2.68 --- src/modules/sni/item.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/sni/item.cpp b/src/modules/sni/item.cpp index 917a92a9..d9748eda 100644 --- a/src/modules/sni/item.cpp +++ b/src/modules/sni/item.cpp @@ -287,7 +287,11 @@ Glib::RefPtr Item::extractPixBuf(GVariant* variant) { if (array != nullptr) { g_free(array); } +#if GLIB_MAJOR_VERSION >= 2 && GLIB_MINOR_VERSION >= 68 array = static_cast(g_memdup2(data, size)); +#else + array = static_cast(g_memdup(data, size)); +#endif lwidth = width; lheight = height; }