summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrbuj <[email protected]>2021-03-25 12:22:36 +0100
committerraveit65 <[email protected]>2021-04-02 22:17:07 +0200
commitd426f1e0b22e19c789bfd00adb91d185f2e00a57 (patch)
tree85ceac2b1270b479eae1399d76cde824fe179652 /src
parentd9c330a78f46ee8eaf46531ff846743fb8d38386 (diff)
downloadmate-system-monitor-d426f1e0b22e19c789bfd00adb91d185f2e00a57.tar.bz2
mate-system-monitor-d426f1e0b22e19c789bfd00adb91d185f2e00a57.tar.xz
openfiles: g_memdup is dreprecated from glib 2.68
Diffstat (limited to 'src')
-rw-r--r--src/openfiles.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/openfiles.cpp b/src/openfiles.cpp
index f972c51..0a27795 100644
--- a/src/openfiles.cpp
+++ b/src/openfiles.cpp
@@ -119,7 +119,11 @@ add_new_files (gpointer key, gpointer value, gpointer data)
COL_FD, openfiles->fd,
COL_TYPE, get_type_name(static_cast<glibtop_file_type>(openfiles->type)),
COL_OBJECT, object,
+#if GLIB_CHECK_VERSION (2, 68, 0)
+ COL_OPENFILE_STRUCT, g_memdup2(openfiles, sizeof(*openfiles)),
+#else
COL_OPENFILE_STRUCT, g_memdup(openfiles, sizeof(*openfiles)),
+#endif
-1);
g_free(object);