summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2022-10-10 14:34:25 +0100
committerSimon McVittie <smcv@collabora.com>2022-10-10 14:34:25 +0100
commitcdef2bb414ec05aa9bb4bf7cc15743d643eef6c3 (patch)
tree373a48bf4c91346b2900dcd7a9e1f3cefbc44969
parent0b5d4a079bf02f0a869afcbad3c20190776d733e (diff)
downloadlibglnx-cdef2bb414ec05aa9bb4bf7cc15743d643eef6c3.tar.gz
backports: Use #ifndef instead of GLIB_CHECK_VERSION
As Will Thompson pointed out on !37, G_OPTION_ENTRY_NULL is a macro in GLib, so we can test for it with `#ifndef` rather than a version guard. This is a little bit nicer for parent projects that might already have their own backport of it. Signed-off-by: Simon McVittie <smcv@collabora.com>
-rw-r--r--glnx-backports.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/glnx-backports.h b/glnx-backports.h
index d109833..0a0a9da 100644
--- a/glnx-backports.h
+++ b/glnx-backports.h
@@ -84,7 +84,7 @@ gboolean glnx_set_object (GObject **object_ptr,
#define G_DBUS_METHOD_INVOCATION_UNHANDLED FALSE
#endif
-#if !GLIB_CHECK_VERSION(2, 70, 0)
+#ifndef G_OPTION_ENTRY_NULL /* added in 2.70 */
#define G_OPTION_ENTRY_NULL { NULL, 0, 0, 0, NULL, NULL, NULL }
#endif