write_queue: Use EBADF instead of EBABDFD for portability

EBADFD is linux specific while EBADF is POSIX. Fix the build on
FreeBSD and use EBADF throughout the file.
3 files changed