socket: fix out-of-bounds array write on Mac.

Signed-off-by: Peter Soetens <peter@thesourceworks.com>
Merge pull request #4 from psoetens/toolchain-2.7

socket: fix out-of-bounds array write on Mac.