Fix compilation on *BSD
Merge branch 'master' into HEAD
Fix sigv3 for S3.