Some systems provide strnlen of various forms. On my system, for instance, its signature is:
size_t strnlen(const char *s, size_t maxlen);
util/goodies.h also defines a version of strnlen, presumably to handle platforms where strnlen is not provided. However, its definition conflicts:
inline int strnlen( const char *s, int n ) ...
For some files, like bsoninlines.h, that don't include dependent headers, but reference strnlen, the resolved symbol will be the 'system' strnlen, and when included in other contexts, like where goodies.h is in the include chain, this will resolve as mongo::strnlen. If the intention is to use the mongo definition of strnlen, then the uses in these files should be namespace qualified.