[Asterisk-cvs] asterisk/apps Makefile, 1.84, 1.85 app_nbscat.c, 1.7, 1.8 app_qcall.c, 1.13, 1.14 app_sms.c, 1.14, 1.15

markster at lists.digium.com markster at lists.digium.com
Tue Dec 14 18:39:43 CST 2004


Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv25047/apps

Modified Files:
	Makefile app_nbscat.c app_qcall.c app_sms.c 
Log Message:
Merge slimey's Solaris compatibility (with small mods) (bug #2740)


Index: Makefile
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/Makefile,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -d -r1.84 -r1.85
--- Makefile	28 Nov 2004 21:28:30 -0000	1.84
+++ Makefile	14 Dec 2004 23:36:29 -0000	1.85
@@ -33,8 +33,10 @@
      app_dumpchan.so app_waitforsilence.so
 
 ifneq (${OSARCH},Darwin)
+ifneq (${OSARCH},SunOS)
 APPS+=app_intercom.so
 endif
+endif
 
 #
 # Obsolete things...

Index: app_nbscat.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_nbscat.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- app_nbscat.c	22 Jun 2004 19:32:52 -0000	1.7
+++ app_nbscat.c	14 Dec 2004 23:36:29 -0000	1.8
@@ -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";

Index: app_qcall.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_qcall.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- app_qcall.c	8 Aug 2004 17:15:02 -0000	1.13
+++ app_qcall.c	14 Dec 2004 23:36:29 -0000	1.14
@@ -95,6 +95,23 @@
 #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)

Index: app_sms.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_sms.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- app_sms.c	11 Dec 2004 22:36:27 -0000	1.14
+++ app_sms.c	14 Dec 2004 23:36:29 -0000	1.15
@@ -1077,6 +1077,10 @@
    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 */




More information about the svn-commits mailing list