Also a couple of minor changes: fail if we can't lock instead of silently succeeding, and apply a couple of minor style fixes.
From NetBSD's src/trunk/tools/compat/flock.c, no OpenSSH changes yet.