Fails to find PTHREAD_MUTEX_RECURSIVE on FreeBSD
This line fails:
CHECK_SYMBOL_EXISTS(PTHREAD_MUTEX_RECURSIVE pthread.h HAVE_PTHREAD_MUTEX_RECURSIVE_DEFN)
Log:
Determining if the PTHREAD_MUTEX_RECURSIVE exist failed with the following output:
Change Dir: /tmp/x/CMakeFiles/CMakeTmp
Run Build Command:"/usr/local/bin/gmake" "cmTC_d1e0e/fast"
/usr/local/bin/gmake -f CMakeFiles/cmTC_d1e0e.dir/build.make CMakeFiles/cmTC_d1e0e.dir/build
gmake[1]: Entering directory '/tmp/x/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_d1e0e.dir/CheckSymbolExists.c.o
/usr/bin/cc -o CMakeFiles/cmTC_d1e0e.dir/CheckSymbolExists.c.o -c /tmp/x/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/tmp/x/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:18: error: cannot take the address of an rvalue of type 'int'
return ((int*)(&PTHREAD_MUTEX_RECURSIVE))[argc];
^~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.