fix flock errno under osx
Merge remote-tracking branch 'kali/bug/fix-flock-errno-osx' into develop