Check for PR_SET_NAME
authorMatthias Clasen <mclasen@redhat.com>
Thu, 19 Jul 2012 10:37:59 +0000 (06:37 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 19 Jul 2012 10:37:59 +0000 (06:37 -0400)
Bug 680148 claims that PR_SET_NAME may not be defined when
using an old kernel. Deal with it.

glib/gthread-posix.c

index 3f74aa4de6484c8273899edea2bc6d43c9d53f99..b38aaa540d1821c6a8b09673c295dea6535a7495 100644 (file)
@@ -1172,8 +1172,10 @@ void
 g_system_thread_set_name (const gchar *name)
 {
 #ifdef HAVE_SYS_PRCTL_H
+#ifdef PR_SET_NAME
   prctl (PR_SET_NAME, name, 0, 0, 0, 0);
 #endif
+#endif
 }
 
 /* {{{1 Epilogue */