This patch contributed by John Kodumal. To use it: $ cd smbase $ patch // size_t -#include // POSIX regex functions - +#ifndef __FreeBSD__ +#include +#else +#include // POSIX regex functions +#endif // get an error string static string regexpErrorString(regex_t const *pat, int code)