task: use bionic/libc friendly arguments to prctl

prctl is supposed to take 5 arguments. It used to work with 2 arguments on some
versions of libc because it is defined as a varags function there.

See #611911
This commit is contained in:
Wim Taymans 2010-03-15 17:07:59 +01:00
parent fb9243178a
commit c78c637a77
2 changed files with 2 additions and 3 deletions

View file

@ -281,9 +281,8 @@ dnl check for pthreads
AC_CHECK_HEADERS([pthread.h], HAVE_PTHREAD_H=yes) AC_CHECK_HEADERS([pthread.h], HAVE_PTHREAD_H=yes)
AM_CONDITIONAL(HAVE_PTHREAD_H, test "x$HAVE_PTHREAD_H" = "xyes") AM_CONDITIONAL(HAVE_PTHREAD_H, test "x$HAVE_PTHREAD_H" = "xyes")
dnl check for sys/prctl dnl check for sys/prctl for setting thread name on Linux
AC_CHECK_HEADERS([sys/prctl.h], HAVE_SYS_PRCTL_H=yes) AC_CHECK_HEADERS([sys/prctl.h], HAVE_SYS_PRCTL_H=yes)
AM_CONDITIONAL(HAVE_SYS_PRTCL_H, test "x$HAVE_SYS_PRCTL_H" = "xyes")
dnl Check for valgrind.h dnl Check for valgrind.h
dnl separate from HAVE_VALGRIND because you can have the program, but not dnl separate from HAVE_VALGRIND because you can have the program, but not

View file

@ -201,7 +201,7 @@ gst_task_configure_name (GstTask * task)
GST_DEBUG_OBJECT (task, "Could not create thread name for '%s'", name); GST_DEBUG_OBJECT (task, "Could not create thread name for '%s'", name);
} else { } else {
GST_DEBUG_OBJECT (task, "Setting thread name to '%s'", thread_name); GST_DEBUG_OBJECT (task, "Setting thread name to '%s'", thread_name);
if (prctl (PR_SET_NAME, (unsigned long int) thread_name)) if (prctl (PR_SET_NAME, (unsigned long int) thread_name, 0, 0, 0))
GST_DEBUG_OBJECT (task, "Failed to set thread name"); GST_DEBUG_OBJECT (task, "Failed to set thread name");
} }
#endif #endif