Use struct flock rather than flock to keep mac happy.
Merge pull request #834 from ktf/struct-flock

Use struct flock rather than flock to keep mac happy.