mac compile fix

svn path=/trunk/boinc/; revision=907
This commit is contained in:
Eric Heien 2003-02-14 07:42:53 +00:00
parent f02c4bf105
commit 1fca493e08
1 changed files with 4 additions and 4 deletions

View File

@ -155,14 +155,14 @@ int lock_file(char* filename) {
int retval;
// some systems have both!
#ifdef HAVE_FLOCK
int lock = open(filename, O_WRONLY|O_CREAT, 0644);
retval = flock(lock, LOCK_EX|LOCK_NB);
#else
#ifdef HAVE_LOCKF
int lock = open(filename, O_WRONLY|O_CREAT, 0644);
retval = lockf(lock, F_TLOCK, 1);
// must leave fd open
#else
#ifdef HAVE_FLOCK
int lock = open(filename, O_WRONLY|O_CREAT, 0644);
retval = flock(lock, LOCK_EX|LOCK_NB);
#endif
#endif