libgit2/libgit2 — pull request #2121 by bk2204 (2014-02-15 23:24:24+00:00)
Title: Check for EWOULDBLOCK as well as EAGAIN on write.

On some systems, notably HP PA-RISC systems running Linux or HP-UX,
EWOULDBLOCK and EAGAIN are not the same value. POSIX (and these OSes) allow
EWOULDBLOCK to occur on write(2) (and send(2), etc.), so check explicitly
for this case as well as EAGAIN. On most systems, where they are the same,
the compiler will simply optimize this check out and it will have no effect.

I don't actually have access to a PA-RISC system to test this on, so I haven't tested this except on Debian sid/amd64, where this works fine.