tst_res.c: undefined symbol TEST_ERRNO

Get the correct error code from errno, instead of TEST_ERRNO.
(TEST_ERRNO is defined in lib/parse_opt.c if #ifdef UNIT_TEST)