If you use _res via res_init (or indeed via res_ninit) on NetBSD, then it fails with this error:

_res is not supported for multi-threaded programs.
[1]   Abort trap (core dumped) ${dir}${tst}
FAIL: NetworkTester

Do you want to test it on a Mac, and if it doesn't work, we can change something, I guess switch using ifdefs. It works fine on my fairly old Ubuntu install and Travis seems happy too.