As Jason analyzed, Solaris <string.h> declares memchr for C++ as returning
const void * as specified by the C++ standard, while gcc expects the return
type to be void * like in C.
So this patch xfails the test for C++ on Solaris.
Tested on sparc-sun-solaris2.11 and x86_64-pc-linux-gnu.