diff --git a/glib/gthread-posix.c b/glib/gthread-posix.c index 9c0b032e6..1e2fdb59a 100644 --- a/glib/gthread-posix.c +++ b/glib/gthread-posix.c @@ -1177,7 +1177,7 @@ g_system_thread_new (GThreadFunc proxy, #ifdef _SC_THREAD_STACK_MIN long min_stack_size = sysconf (_SC_THREAD_STACK_MIN); if (min_stack_size >= 0) - stack_size = MAX (min_stack_size, stack_size); + stack_size = MAX ((gulong) min_stack_size, stack_size); #endif /* _SC_THREAD_STACK_MIN */ /* No error check here, because some systems can't do it and * we simply don't want threads to fail because of that. */