mirror of
https://github.com/glest/glest-source.git
synced 2025-08-16 05:13:59 +02:00
- attempt to fix issue #72
This commit is contained in:
@@ -287,10 +287,13 @@ inline bool acquire_file_lock(int hnd)
|
||||
{
|
||||
#ifndef WIN32
|
||||
struct ::flock lock;
|
||||
// Initialize the flock structure.
|
||||
memset(&lock, 0, sizeof(lock));
|
||||
lock.l_type = F_WRLCK;
|
||||
lock.l_whence = SEEK_SET;
|
||||
lock.l_start = 0;
|
||||
lock.l_len = 0;
|
||||
lock.l_pid = 0;
|
||||
return -1 != ::fcntl(hnd, F_SETLK, &lock);
|
||||
#else
|
||||
HANDLE hFile = (HANDLE)_get_osfhandle(hnd);
|
||||
|
Reference in New Issue
Block a user