Safer fix for clang gripes in msocket.