summaryrefslogtreecommitdiff
path: root/tests/test-io-stream-common.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-io-stream-common.h')
-rw-r--r--tests/test-io-stream-common.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test-io-stream-common.h b/tests/test-io-stream-common.h
index 1e37954..680a28c 100644
--- a/tests/test-io-stream-common.h
+++ b/tests/test-io-stream-common.h
@@ -44,6 +44,10 @@
#include <unistd.h>
#endif
+#if !GLIB_CHECK_VERSION(2, 58, 0)
+#define G_SOURCE_FUNC(f) ((GSourceFunc) (void (*)(void)) (f))
+#endif
+
/* Make the message sufficiently large to not hit Nagle’s algorithm in the
* pseudo-TCP implementation, and hence run really slowly. */
#define MESSAGE_SIZE 1284 /* bytes */