diff --git a/harbour/source/rtl/filesys.c b/harbour/source/rtl/filesys.c index e684b05e02..b59c614cad 100644 --- a/harbour/source/rtl/filesys.c +++ b/harbour/source/rtl/filesys.c @@ -412,7 +412,7 @@ BOOL hb_fsLock ( FHANDLE handle, ULONG start, ULONG length, USHORT mode ) { int result=0; - long pos; + ULONG position; #if defined(HAVE_POSIX_IO) && !defined(__GNUC__) && !defined(__IBMCPP__) errno = 0; @@ -428,9 +428,9 @@ BOOL hb_fsLock ( FHANDLE handle, ULONG start, last_error = errno; #else #if defined(_MSC_VER) - pos = hb_fsSeek( handle, start, 0 ); + position = hb_fsSeek( handle, start, 0 ); result = locking( handle, mode?_LK_UNLCK:_LK_LOCK,length ); - hb_fsSeek( handle, pos, 0 ); + hb_fsSeek( handle, position, 0 ); #else result = 1; last_error = FS_ERROR;