[glib] Check for PR_SET_NAME



commit 23a2136fb5dd860a57a9bd46e61099ea4da99447
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Jul 19 06:37:59 2012 -0400

    Check for PR_SET_NAME
    
    Bug 680148 claims that PR_SET_NAME may not be defined when
    using an old kernel. Deal with it.

 glib/gthread-posix.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/glib/gthread-posix.c b/glib/gthread-posix.c
index 3f74aa4..b38aaa5 100644
--- a/glib/gthread-posix.c
+++ b/glib/gthread-posix.c
@@ -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 */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]