Add fix for incorrect mapping of fcntl64() -> fcntl(), causing locking failures
We need to call fcntl64() if possible for 32-bit hosts
This is a strange case of socket_wrapper breaking normal file operation.
Newer glibc has introduced fcntl64 and symbol renaming but
the end function call was not caught by the automatic rename.
This means socket_wrapper would call fcntl(), not fcntl64 in libc
and this would do a "struct flock" -> "struct flock64" translation on the
supplied argument, despite this being already a flock64 from
the caller.
This in turn changed the lock offset values (eg to 0, 0).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15367
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>