ucspi-ssl  0.99e
TLS encryption for IPv6 communication
lock_ex.c
Go to the documentation of this file.
1 /* Public domain. */
2 
3 #include <sys/types.h>
4 #include <sys/file.h>
5 #include <fcntl.h>
6 #include <unistd.h>
7 #include "hasflock.h"
8 #include "lock.h"
9 
10 #ifdef HASFLOCK
11 int lock_ex(int fd) { return flock(fd,LOCK_EX); }
12 #else
13 int lock_ex(int fd) { return lockf(fd,1,0); }
14 #endif
int lock_ex(int fd)
Definition: lock_ex.c:13