Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Wilkens <RobWilkens@gmail.com>2012-06-26 04:17:24 +0400
committerRob Wilkens <RobWilkens@gmail.com>2012-06-26 04:17:24 +0400
commit0fb2958a6602f947c545a439167c081d46ee99f1 (patch)
tree147b16881ab901918b861860844b701430f19c62 /support
parentd52c0802344926b9807c4efe77844ea7b741de69 (diff)
For Bug 2014: map FcntlCommand to local system command for fcntl_lock
In support/fcntl.c - every time fcntl() was called, it would first map the cmd from mono's version of it to the system header file version of it. The only time this wasn't happening was in Mono_Posix_Syscall_fcntl_lock() and now it does it there too. This seems to resolve Bug 2014 on both 64-bit linux and on Mac OS X (64-bit).
Diffstat (limited to 'support')
-rw-r--r--support/fcntl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/support/fcntl.c b/support/fcntl.c
index d7e9c481180..013d9cd4167 100644
--- a/support/fcntl.c
+++ b/support/fcntl.c
@@ -69,6 +69,9 @@ Mono_Posix_Syscall_fcntl_lock (gint32 fd, gint32 cmd, struct Mono_Posix_Flock *l
if (Mono_Posix_FromFlock (lock, &_lock) == -1)
return -1;
+ if (Mono_Posix_FromFcntlCommand (cmd, &cmd) == -1)
+ return -1;
+
r = fcntl (fd, cmd, &_lock);
if (Mono_Posix_ToFlock (&_lock, lock) == -1)