VxWorks port and modern C++

WindRiver VxWorks 7 SR0660 ships with C++ Boost 1.7.4, therefore using their own headers. However, we had been supporting C++ Boost for VxWorks for a while and we also had our own C++ Boost and headers.

When any common customer would create a DKM application, they would include both C++ Boost, and that would mean multiple definitions. I had to rebuild our libraries with a new definition for the compiler that would disable certain APIs to avoid duplication errors such as:

../boost_1_74_0/boost/config/platform/vxworks.hpp:227:12: error: redefinition of 'truncate'
inline int truncate(const char *p, off_t l){
^
note: previous definition is here inline int truncate(const char *p, off_t l){

This is a quick workaround that is very simple when you are use to porting. It requires declaring a constant at compile time for your compiler and then using it at the right time in the right codepath.