diff --git a/glib/gutils.c b/glib/gutils.c index c5aef47fa..aff3ed442 100644 --- a/glib/gutils.c +++ b/glib/gutils.c @@ -995,7 +995,7 @@ g_get_host_name (void) #ifdef _SC_HOST_NAME_MAX max = sysconf (_SC_HOST_NAME_MAX); - if (max > 0 && max <= G_MAXSIZE - 1) + if (max > 0 && (gsize) max <= G_MAXSIZE - 1) size = (gsize) max + 1; else #ifdef HOST_NAME_MAX