Check for PR_GET_NAME
authorEmmanuel Pacaud <emmanuel@gnome.org>
Wed, 7 Nov 2012 08:58:45 +0000 (09:58 +0100)
committerEmmanuel Pacaud <emmanuel@gnome.org>
Thu, 8 Nov 2012 07:19:43 +0000 (08:19 +0100)
PR_GET_NAME may not be defined when using an old kernel. Deal with it.

glib/tests/thread.c

index 29b3850..f91fcae 100644 (file)
@@ -168,12 +168,14 @@ static gpointer
 thread6_func (gpointer data)
 {
 #ifdef HAVE_SYS_PRCTL_H
+#ifdef PR_GET_NAME
   const gchar name[16];
 
   prctl (PR_GET_NAME, name, 0, 0, 0, 0);
 
   g_assert_cmpstr (name, ==, (gchar*)data);
 #endif
+#endif
 
   return NULL;
 }