summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2021-05-23 23:51:27 +0100
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2021-06-02 14:21:02 +0000
commit577dabf7b1ec020e8fb3e0b9106cabc40d0978b2 (patch)
tree81b65a4ce952d8757f2171e48008d0ac2caa6065 /meson.build
parenteb47c5aa2d7ec0158b7819c792871f6575840769 (diff)
Use g_memdup2() where available and add fallback for older GLib versions
g_memdup() is deprecated since GLib 2.68 and we want to avoid deprecation warnings with recent versions of GLib. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1171>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build4
1 files changed, 4 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index c2a6b1d6c..435679eae 100644
--- a/meson.build
+++ b/meson.build
@@ -527,6 +527,10 @@ if gst_version_nano == 0
endif
endif
+if gio_dep.version().version_compare('< 2.67.4')
+ core_conf.set('g_memdup2(ptr,sz)', '(G_LIKELY(((guint64)(sz)) < G_MAXUINT)) ? g_memdup(ptr,sz) : (g_abort(),NULL)')
+endif
+
# Use core_conf after all subdirs have set values
configure_file(output : 'config.h', configuration : core_conf)