bitcoin/bitcoin — pull request #5340 by paveljanik (2014-11-21 11:16:32+00:00)
Title: Check for strnlen and provide it if it is not found

strnlen is POSIX.1-2008. Thus on some older/incompatible systems, this function is not defined. E.g. current mingw (see http://sourceforge.net/p/mingw/bugs/1912/) or on older Mac OS X. Check for such conditions and use memchr based implementation instead. This should fix #5338.