0

I have an application originially developed in linux. Now I want to compile the application on a freebsd box, but I am getting some pthreads compilation errors:

Building file: ../feedProcessor.cpp
Invoking: GCC C++ Compiler
g++7 -I/usr/local/pgsql/include -O0 -g3 -Wall -std=c++14 -c -fmessage-length=0 -MMD -MP -MF"feedProcessor.d" -MT"feedProcessor.o" -o "feedProcessor.o" "../feedProcessor.cpp"
../feedProcessor.cpp: In constructor 'feedProcessor::feedProcessor(wqueue<std::__cxx11::basic_string<char>*>&, webApi*, std::__cxx11::string, std::__cxx11::string, std::__cxx11::string, std::__cxx11::string, std::__cxx11::string)':
../feedProcessor.cpp:20:47: error: 'PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP' was not declared in this scope
  pthread_rwlockattr_setkind_np(&lock_attribs, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP);
                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gmake: *** [subdir.mk:47: feedProcessor.o] Error 1

Is PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP a Linux specific feature, or do I simply not setup/inform the compiler in the FreeBSD environment correctly what to use / where to look for it?

Daniel P.
  • 89
  • 6

0 Answers0