diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-12-14 23:36:30 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-12-14 23:36:30 +0000 |
commit | 70cedacdde512d2ed5984eec242c55f3239b73fc (patch) | |
tree | 48694f38698e4ead3840305333816193c7fcd8a0 /apps/app_qcall.c | |
parent | c60f8a2b8e1551244e674baff85cb1a4f2d5fd5b (diff) |
Merge slimey's Solaris compatibility (with small mods) (bug #2740)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4446 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_qcall.c')
-rwxr-xr-x | apps/app_qcall.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/apps/app_qcall.c b/apps/app_qcall.c index f5721e167..204e491a0 100755 --- a/apps/app_qcall.c +++ b/apps/app_qcall.c @@ -95,6 +95,23 @@ LOCAL_USER_DECL; #define OURCLID "2564286275" /* The callerid to be displayed when calling */ #endif +#ifdef SOLARIS +int flock(int fd, int type) +{ + struct flock lock; + + lock.l_type = type; + lock.l_whence = SEEK_SET; + lock.l_start = 0; + lock.l_len = 0; + + return fcntl(f, F_SETLK, &lock); +} + +#define LOCK_EX F_WRLCK +#define LOCK_UN F_UNLCK +#endif + static void *qcall_do(void *arg); static void *qcall(void *ignore) |