Mercurial > audlegacy
changeset 963:e42ce60c308f trunk
[svn] - GLib 2.6 compatibility wrapper, per bug #469
author | nenolod |
---|---|
date | Mon, 24 Apr 2006 12:46:47 -0700 |
parents | a341792533a6 |
children | bf06569fb0b4 |
files | audacious/prefswin.c |
diffstat | 1 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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)