diff options
author | Tim-Philipp Müller <tim@centricular.com> | 2021-05-23 19:15:25 +0100 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2021-08-05 20:51:00 +0530 |
commit | a561b1bd8601ed8ae8769339cc8d93c2c23e2d84 (patch) | |
tree | 632d06f7df0536e5e083826b182ddaf50a9503b1 /meson.build | |
parent | 743387052856352c9baa66b6c5c197e3ec5f452b (diff) | |
download | gstreamer-plugins-bad-a561b1bd8601ed8ae8769339cc8d93c2c23e2d84.tar.gz |
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-bad/-/merge_requests/2280>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/meson.build b/meson.build index 6bea50cc0..beee7d4a7 100644 --- a/meson.build +++ b/meson.build @@ -537,6 +537,10 @@ if gst_version_nano == 0 endif endif +if glib_dep.version().version_compare('< 2.67.4') + cdata.set('g_memdup2(ptr,sz)', '(G_LIKELY(((guint64)(sz)) < G_MAXUINT)) ? g_memdup(ptr,sz) : (g_abort(),NULL)') +endif + configure_file(output : 'config.h', configuration : cdata) run_command(python3, '-c', 'import shutil; shutil.copy("hooks/pre-commit.hook", ".git/hooks/pre-commit")') |