From 63b4d9a96ba2e8266262c7f6f36b5f44af894964 Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Wed, 13 Apr 2016 14:32:18 +0200 Subject: Match different errors for GLib <= 2.36 --- ucad.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ucad.c b/ucad.c index 02e2f95..4d46bca 100644 --- a/ucad.c +++ b/ucad.c @@ -366,7 +366,11 @@ serve_connection (GSocketConnection *connection, UcaCamera *camera) g_input_stream_read (input, buffer, 4096, NULL, &error); message = (UcaNetMessageDefault *) buffer; +#if (GLIB_CHECK_VERSION (2, 36, 0)) if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_BROKEN_PIPE)) { +#else + if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_FAILED)) { +#endif g_error_free (error); error = NULL; active = FALSE; -- cgit v1.2.3