Comment 2 for bug 1258168

Revision history for this message
Don Slutz (dslutz) wrote :

This is the same as listed in:

https://lists.gnu.org/archive/html/qemu-devel/2013-05/msg01667.html

rpm -q glib2
glib2-2.12.3-4.el5_3.1
glib2-2.12.3-4.el5_3.1

Using:
http://pidgin.im/pipermail/commits/2011-February/018919.html

I came up with:

diff --git a/libcacard/vscclient.c b/libcacard/vscclient.c
index a3cb776..5c9cec8 100644
--- a/libcacard/vscclient.c
+++ b/libcacard/vscclient.c
@@ -407,7 +407,13 @@ do_socket_read(GIOChannel *source,
             }
             break;
         default:
+#if GLIB_CHECK_VERSION(2, 16 ,0)
             g_warn_if_reached();
+#else
+ g_log(G_LOG_DOMAIN, G_LOG_LEVEL_WARNING,
+ "(%s:%d):%s%s code should not be reached",
+ __FILE__, __LINE__, G_STRFUNC, G_STRFUNC[0] ? ":" : "");
+#endif
             return FALSE;
         }

@@ -760,7 +766,11 @@ main(

     g_io_channel_unref(channel_stdin);
     g_io_channel_unref(channel_socket);
+#if GLIB_CHECK_VERSION(2, 22, 0)
     g_byte_array_unref(socket_to_send);
+#else
+ g_byte_array_free(socket_to_send, TRUE);
+#endif

     closesocket(sock);
     return 0;

And I get a clean compile.