Merge slimey's Solaris compatibility (with small mods) (bug #2740)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4446 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2004-12-14 23:36:30 +00:00
parent 0f205bb079
commit 9d40b8ee80
55 changed files with 1098 additions and 62 deletions

View File

@@ -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...

View File

@@ -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";

View File

@@ -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)

View File

@@ -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 */