Fix a build issue with FreeBSD

error_t is defined in glibc
check to make sure it's defined, if not define it manually.