# HG changeset patch # User nenolod # Date 1145908007 25200 # Node ID e42ce60c308fa1f5198d4323c45ee119c1255697 # Parent a341792533a65156b9946f2a8c14b2ccd0023fe0 [svn] - GLib 2.6 compatibility wrapper, per bug #469 diff -r a341792533a6 -r e42ce60c308f audacious/prefswin.c --- a/audacious/prefswin.c Mon Apr 24 00:40:43 2006 -0700 +++ b/audacious/prefswin.c Mon Apr 24 12:46:47 2006 -0700 @@ -113,6 +113,18 @@ static const guint n_title_field_tags = G_N_ELEMENTS(title_field_tags); +/* GLib 2.6 compatibility */ +#if (! ((GLIB_MAJOR_VERSION > 2) || ((GLIB_MAJOR_VERSION == 2) && (GLIB_MINOR_VERSION >= 8)))) +static const char * +g_get_host_name (void) +{ + static char hostname [HOST_NAME_MAX + 1]; + if (gethostname (hostname, HOST_NAME_MAX) == -1) { + return _("localhost"); + } + return hostname; +} +#endif static GladeXML * prefswin_get_xml(void)