diff options
author | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2009-06-18 20:21:47 -0300 |
---|---|---|
committer | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2009-06-18 20:21:47 -0300 |
commit | 7423532705e212cd801275a2ebc4258b807711f7 (patch) | |
tree | efc6b59d750cdc00f40025590b7e14e29068da9b /configure.in | |
parent | 3120a70e7011671a4180873671f8a32f5e4942a6 (diff) | |
download | mariadb-git-7423532705e212cd801275a2ebc4258b807711f7.tar.gz |
Bug#42599: error: `pthread_setschedprio' was not declared in this scope
The problem was that a pthread.h header used by gcc did not
declare the pthread_setscheprio, yet the function is implemented
by the function is implemented, causing a autoconf check to pass
and compilation with C++ to fail. The solution is to add a
autoconf check to ensure that the function is properly declared.
configure.in:
Check that the pthread_setschedprio is declared.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/configure.in b/configure.in index d323ce9f726..bd26e584bfe 100644 --- a/configure.in +++ b/configure.in @@ -2076,6 +2076,25 @@ case "$mysql_cv_sys_os" in # unsupported priority values are passed to pthread_setschedprio. # Since the only supported value is 1, treat it as inexistent. ;; + SunOS) # Bug#42599 error: `pthread_setschedprio' was not declared in this scope + # In some installations, the pthread.h header used by GCC does not + # declare the pthread_setscheprio prototype, but the function is + # implemented. Since the function is used in C++ code, ensure that + # the function prototype is present. + AC_MSG_CHECKING([whether pthread_setschedprio is declared]) + AC_LANG_PUSH([C++]) + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([#include <pthread.h>], + [(void)(pthread_setschedprio);])], + [ac_cv_func_pthread_setschedprio=yes], + [ac_cv_func_pthread_setschedprio=no]) + AC_LANG_POP([C++]) + AC_MSG_RESULT([$ac_cv_func_pthread_setschedprio]) + if test "$ac_cv_func_pthread_setschedprio" = yes; then + AC_DEFINE(HAVE_PTHREAD_SETSCHEDPRIO, 1, + [Define to 1 if you have the `pthread_setschedprio' function.]) + fi + ;; *) AC_CHECK_FUNCS(pthread_setschedprio) ;; esac |