tests: Fix warning when building with newer GLib version
authorOlivier Crête <olivier.crete@collabora.com>
Wed, 22 Jul 2020 19:29:24 +0000 (15:29 -0400)
committerOlivier Crête <olivier.crete@collabora.com>
Wed, 22 Jul 2020 21:28:56 +0000 (17:28 -0400)
tests/test-io-stream-common.h

index 86f5dd0..71f2f59 100644 (file)
 #include <unistd.h>
 #endif
 
-#if !GLIB_CHECK_VERSION(2, 58, 0)
-#define G_SOURCE_FUNC(f) ((GSourceFunc) (void (*)(void)) (f))
+/* Remove this when we request GLib 2.58 */
+#if defined (GLIB_VERSION_2_58) && GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_58
+#error "Remove this paragraph"
 #endif
+#undef G_SOURCE_FUNC
+#define G_SOURCE_FUNC(f) ((GSourceFunc) (void (*)(void)) (f))
 
 /* Make the message sufficiently large to not hit Nagle’s algorithm in the
  * pseudo-TCP implementation, and hence run really slowly. */