udpsrc: Fix build with GLib < 2.44
G_IO_ERROR_CONNECTION_CLOSED was added in 2.44.
This commit is contained in:
parent
89137fc136
commit
50e9cc7f04
@ -580,8 +580,12 @@ retry:
|
|||||||
* with udpsink generated a "port unreachable" ICMP response. We ignore
|
* with udpsink generated a "port unreachable" ICMP response. We ignore
|
||||||
* that and try again.
|
* that and try again.
|
||||||
* On Windows we get G_IO_ERROR_CONNECTION_CLOSED instead */
|
* On Windows we get G_IO_ERROR_CONNECTION_CLOSED instead */
|
||||||
|
#if GLIB_CHECK_VERSION(2,44,0)
|
||||||
if (g_error_matches (err, G_IO_ERROR, G_IO_ERROR_HOST_UNREACHABLE) ||
|
if (g_error_matches (err, G_IO_ERROR, G_IO_ERROR_HOST_UNREACHABLE) ||
|
||||||
g_error_matches (err, G_IO_ERROR, G_IO_ERROR_CONNECTION_CLOSED)) {
|
g_error_matches (err, G_IO_ERROR, G_IO_ERROR_CONNECTION_CLOSED)) {
|
||||||
|
#else
|
||||||
|
if (g_error_matches (err, G_IO_ERROR, G_IO_ERROR_HOST_UNREACHABLE)) {
|
||||||
|
#endif
|
||||||
g_clear_error (&err);
|
g_clear_error (&err);
|
||||||
goto retry;
|
goto retry;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user