aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-12-14 23:36:30 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-12-14 23:36:30 +0000
commit70cedacdde512d2ed5984eec242c55f3239b73fc (patch)
tree48694f38698e4ead3840305333816193c7fcd8a0 /apps
parentc60f8a2b8e1551244e674baff85cb1a4f2d5fd5b (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')
-rwxr-xr-xapps/Makefile2
-rwxr-xr-xapps/app_nbscat.c4
-rwxr-xr-xapps/app_qcall.c17
-rwxr-xr-xapps/app_sms.c4
4 files changed, 27 insertions, 0 deletions
diff --git a/apps/Makefile b/apps/Makefile
index 08e24de11..48dfdedd7 100755
--- a/apps/Makefile
+++ b/apps/Makefile
@@ -33,8 +33,10 @@ APPS=app_dial.so app_playback.so app_voicemail.so app_directory.so app_mp3.so\
app_dumpchan.so app_waitforsilence.so
ifneq (${OSARCH},Darwin)
+ifneq (${OSARCH},SunOS)
APPS+=app_intercom.so
endif
+endif
#
# Obsolete things...
diff --git a/apps/app_nbscat.c b/apps/app_nbscat.c
index 75951de51..f8b4b37b9 100755
--- a/apps/app_nbscat.c
+++ b/apps/app_nbscat.c
@@ -31,6 +31,10 @@
#define LOCAL_NBSCAT "/usr/local/bin/nbscat8k"
#define NBSCAT "/usr/bin/nbscat8k"
+#ifndef AF_LOCAL
+#define AF_LOCAL AF_UNIX
+#endif
+
static char *tdesc = "Silly NBS Stream Application";
static char *app = "NBScat";
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)
diff --git a/apps/app_sms.c b/apps/app_sms.c
index faba221d6..42412ddf5 100755
--- a/apps/app_sms.c
+++ b/apps/app_sms.c
@@ -1077,6 +1077,10 @@ sms_handleincoming (sms_t * h)
return 0; /* no error */
}
+#ifdef SOLARIS
+#define NAME_MAX 1024
+#endif
+
static void
sms_nextoutgoing (sms_t * h)
{ /* find and fill in next message, or send a REL if none waiting */