video-anc: G_GNUC_CHECK_VERSION was added in GLib 2.42
authorSebastian Dröge <sebastian@centricular.com>
Mon, 26 Nov 2018 10:29:41 +0000 (11:29 +0100)
committerSebastian Dröge <slomo@coaxion.net>
Wed, 28 Nov 2018 13:06:35 +0000 (13:06 +0000)
Define our own version if compiling with older versions. We currently
only require GLib 2.40.

gst-libs/gst/video/video-anc.c

index baaaa5877c5b7b22c25d8e859b6d811265ac4b80..ec9635efc30523f051be9c908a8e80e355f8b927 100644 (file)
 #include <gst/base/gstbytereader.h>
 #include "video-anc.h"
 
+#if !GLIB_CHECK_VERSION(2, 42, 0)
+#ifdef __GNUC__
+#define G_GNUC_CHECK_VERSION(major, minor) \
+    ((__GNUC__ > (major)) || \
+     ((__GNUC__ == (major)) && \
+      (__GNUC_MINOR__ >= (minor))))
+#else
+#define G_GNUC_CHECK_VERSION(major, minor) 0
+#endif
+#endif
+
 /**
  * SECTION:gstvideoanc
  * @title: GstVideo Ancillary