The fix below changes from using "flock" to using "fcntl" on Solaris. The reason is explained in the NOTES section of the flock(3UCB) man page on Solaris: ... Use of these interfaces should be restricted to only appli- cations written on BSD platforms. Use of these interfaces with any of the system libraries or in multi-thread applica- tions is unsupported. ...
The fix below changes from using "flock" to using "fcntl" on Solaris. The reason is explained in the NOTES section of the flock(3UCB) man page on Solaris: ... Use of these interfaces should be restricted to only appli- cations written on BSD platforms. Use of these interfaces with any of the system libraries or in multi-thread applica- tions is unsupported. ...

If fcntl would work on Linux and other *nix platforms, I recommend
making the change for all builds and removing the "ifdef SOLARIS"
blocks.

Signed-off-by: Wyllys Ingersoll <825dce198169cd7e98882a2351af81ffe9c486e5@sun.com>
[Reworked patch so that fcntl can be used on Linux too]
Signed-off-by: Rajiv Andrade <3cd4580e3c128af73a5b4375e865c34e65fd90b2@linux.vnet.ibm.com>

Distrotech/trousers,Distrotech/trousers,emilcondrea/trousers,Distrotech/trousers,emilcondrea/trousers,emilcondrea/trousers