sock: patch from Scott to fix some compilation warnings.