Fixed undefined reference to EINVAL