Fixes to telephony/kamailio:
- avoid compiler warnings due to missing headers, duplicate #defines etc., from maintainer Roman Kravchuk, slight tweak by me (ifndef rather than delete the lines). - fix WANTLIB/LIB_DEPENDS in the subpackages, from me.
This commit is contained in:
parent
6fcbf62ceb
commit
37e80527e8
@ -5,6 +5,7 @@ COMMENT-main = mature and flexible open source SIP server
|
||||
SHARED_ONLY = Yes
|
||||
|
||||
VERSION = 3.2.3
|
||||
REVISION = 0
|
||||
DISTNAME = kamailio-${VERSION}_src
|
||||
PKGNAME-main = kamailio-${VERSION}
|
||||
PKGNAME-mysql = kamailio-mysql-${VERSION}
|
||||
@ -80,8 +81,8 @@ PSEUDO_FLAVORS += no_postgresql
|
||||
MULTI_PACKAGES += -postgresql
|
||||
COMMENT-postgresql = kamailio postgresql module
|
||||
KAMAILIO_MODULES += db_postgres
|
||||
WANTLIB-postgresql = pq
|
||||
LIB_DEPENDS-postgresql =databases/postgresql,-main
|
||||
WANTLIB-postgresql = pq lib/kamailio/srdb1 lib/kamailio/srdb2
|
||||
LIB_DEPENDS-postgresql =databases/postgresql,-main telephony/kamailio,-main
|
||||
.endif
|
||||
|
||||
PSEUDO_FLAVORS += no_mysql
|
||||
@ -89,8 +90,9 @@ PSEUDO_FLAVORS += no_mysql
|
||||
MULTI_PACKAGES += -mysql
|
||||
COMMENT-mysql = kamailio mysql module
|
||||
KAMAILIO_MODULES += db_mysql
|
||||
WANTLIB-mysql = crypto m ssl z mysqlclient
|
||||
LIB_DEPENDS-mysql = databases/mysql,-main
|
||||
WANTLIB-mysql = crypto m ssl z mysqlclient \
|
||||
lib/kamailio/srdb1 lib/kamailio/srdb2
|
||||
LIB_DEPENDS-mysql = databases/mysql,-main telephony/kamailio,-main
|
||||
.endif
|
||||
|
||||
PSEUDO_FLAVORS += no_ldap
|
||||
@ -98,8 +100,8 @@ PSEUDO_FLAVORS += no_ldap
|
||||
MULTI_PACKAGES += -ldap
|
||||
COMMENT-ldap = kamailio LDAP modules
|
||||
KAMAILIO_MODULES += ldap h350
|
||||
WANTLIB-ldap = ldap
|
||||
LIB_DEPENDS-ldap = databases/openldap,-main
|
||||
WANTLIB-ldap = ldap lib/kamailio/srdb2
|
||||
LIB_DEPENDS-ldap = databases/openldap,-main telephony/kamailio,-main
|
||||
.endif
|
||||
|
||||
PSEUDO_FLAVORS += no_xmlrpc
|
||||
@ -109,8 +111,8 @@ COMMENT-xmlrpc = kamailio XML-RPC module
|
||||
KAMAILIO_MODULES += mi_xmlrpc
|
||||
WANTLIB-xmlrpc += pthread xmlrpc xmlrpc_abyss xmlrpc_server
|
||||
WANTLIB-xmlrpc += xmlrpc_server_abyss xmlrpc_util
|
||||
WANTLIB-xmlrpc += xmlrpc_xmlparse xmlrpc_xmltok
|
||||
LIB_DEPENDS-xmlrpc = net/xmlrpc-c
|
||||
WANTLIB-xmlrpc += xmlrpc_xmlparse xmlrpc_xmltok lib/kamailio/kmi
|
||||
LIB_DEPENDS-xmlrpc = net/xmlrpc-c telephony/kamailio,-main
|
||||
.endif
|
||||
|
||||
PSEUDO_FLAVORS += no_snmpstats
|
||||
@ -118,8 +120,8 @@ PSEUDO_FLAVORS += no_snmpstats
|
||||
MULTI_PACKAGES += -snmpstats
|
||||
COMMENT-snmpstats = kamailio snmpstats module
|
||||
KAMAILIO_MODULES += snmpstats
|
||||
WANTLIB-snmpstats = netsnmp netsnmpagent netsnmpmibs
|
||||
LIB_DEPENDS-snmpstats = net/net-snmp
|
||||
WANTLIB-snmpstats = netsnmp netsnmpagent netsnmpmibs lib/kamailio/kcore
|
||||
LIB_DEPENDS-snmpstats = net/net-snmp telephony/kamailio,-main
|
||||
.endif
|
||||
|
||||
PSEUDO_FLAVORS += no_carrierroute
|
||||
@ -127,9 +129,11 @@ PSEUDO_FLAVORS += no_carrierroute
|
||||
MULTI_PACKAGES += -carrierroute
|
||||
COMMENT-carrierroute = kamailio carrierroute module
|
||||
KAMAILIO_MODULES += carrierroute
|
||||
WANTLIB-carrierroute = confuse ${MODGETTEXT_WANTLIB}
|
||||
WANTLIB-carrierroute = confuse ${MODGETTEXT_WANTLIB} \
|
||||
lib/kamailio/kcore lib/kamailio/kmi \
|
||||
lib/kamailio/srdb1 lib/kamailio/trie
|
||||
LIB_DEPENDS-carrierroute = devel/libconfuse \
|
||||
${MODGETTEXT_LIB_DEPENDS}
|
||||
${MODGETTEXT_LIB_DEPENDS} telephony/kamailio,-main
|
||||
.endif
|
||||
|
||||
PSEUDO_FLAVORS += no_perl
|
||||
@ -137,8 +141,8 @@ PSEUDO_FLAVORS += no_perl
|
||||
MULTI_PACKAGES += -perl
|
||||
COMMENT-perl = kamailio perl modules
|
||||
KAMAILIO_MODULES += perl perlvdb
|
||||
WANTLIB-perl = c m perl util
|
||||
LIB_DEPENDS-perl =
|
||||
WANTLIB-perl = c m perl util lib/kamailio/kmi lib/kamailio/srdb1
|
||||
LIB_DEPENDS-perl = telephony/kamailio,-main
|
||||
RUN_DEPENDS-perl = databases/p5-ldap
|
||||
.endif
|
||||
|
||||
|
44
telephony/kamailio/patches/patch-list_h
Normal file
44
telephony/kamailio/patches/patch-list_h
Normal file
@ -0,0 +1,44 @@
|
||||
$OpenBSD: patch-list_h,v 1.1 2012/05/09 21:27:47 sthen Exp $
|
||||
--- list.h.orig Thu Apr 19 13:10:03 2012
|
||||
+++ list.h Wed May 9 18:06:33 2012
|
||||
@@ -33,6 +33,8 @@
|
||||
#ifndef _SER_LIST_H
|
||||
#define _SER_LIST_H
|
||||
|
||||
+#include <sys/queue.h>
|
||||
+
|
||||
/* #include <sys/cdefs.h> - not needed and not present on all the systems */
|
||||
|
||||
/*
|
||||
@@ -133,6 +135,7 @@ struct qm_trace {
|
||||
#define TRASHIT(x)
|
||||
#endif /* QUEUE_MACRO_DEBUG */
|
||||
|
||||
+#ifndef SLIST_HEAD
|
||||
/*
|
||||
* Singly-linked List declarations.
|
||||
*/
|
||||
@@ -205,6 +208,8 @@ struct { \
|
||||
SLIST_FIRST((head)) = SLIST_NEXT(SLIST_FIRST((head)), field); \
|
||||
} while (0)
|
||||
|
||||
+#endif /* SLIST_HEAD */
|
||||
+
|
||||
/*
|
||||
* Singly-linked Tail queue declarations.
|
||||
*/
|
||||
@@ -300,6 +305,7 @@ struct { \
|
||||
(head)->stqh_last = &STAILQ_FIRST((head)); \
|
||||
} while (0)
|
||||
|
||||
+#ifndef LIST_HEAD
|
||||
/*
|
||||
* List declarations.
|
||||
*/
|
||||
@@ -513,5 +519,6 @@ struct { \
|
||||
TRASHIT((elm)->field.tqe_prev); \
|
||||
QMD_TRACE_ELEM(&(elm)->field); \
|
||||
} while (0)
|
||||
+#endif /* LIST_HEAD */
|
||||
|
||||
#endif /* !_LIST_H */
|
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-modules_carrierroute_cr_func_c,v 1.1 2012/05/09 21:27:47 sthen Exp $
|
||||
--- modules/carrierroute/cr_func.c.orig Mon Apr 23 19:52:34 2012
|
||||
+++ modules/carrierroute/cr_func.c Mon Apr 23 19:52:45 2012
|
||||
@@ -319,7 +319,7 @@ static int actually_rewrite(const struct route_rule *r
|
||||
len += SIP_URI.len;
|
||||
}
|
||||
if ( len > MAX_URI_SIZE ) {
|
||||
- LM_ERR("Calculated uri size too large: %d\n", len);
|
||||
+ LM_ERR("Calculated uri size too large: %zu\n", len);
|
||||
return -1;
|
||||
}
|
||||
|
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-modules_db_berkeley_bdb_lib_c,v 1.1 2012/05/09 21:27:47 sthen Exp $
|
||||
--- modules/db_berkeley/bdb_lib.c.orig Mon Apr 23 19:38:24 2012
|
||||
+++ modules/db_berkeley/bdb_lib.c Mon Apr 23 19:38:50 2012
|
||||
@@ -671,7 +671,7 @@ int bdblib_create_journal(bdb_db_p _db_p, bdb_table_p
|
||||
{
|
||||
char *s;
|
||||
char fn[1024];
|
||||
- char d[64];
|
||||
+ char d[128];
|
||||
FILE *fp = NULL;
|
||||
struct tm *t;
|
||||
int bl;
|
||||
@@ -691,7 +691,7 @@ int bdblib_create_journal(bdb_db_p _db_p, bdb_table_p
|
||||
s+=_tp->name.len;
|
||||
|
||||
t = localtime( &tim );
|
||||
- bl=strftime(d,128,"-%Y%m%d%H%M%S.jnl",t);
|
||||
+ bl=strftime(d,sizeof(d),"-%Y%m%d%H%M%S.jnl",t);
|
||||
strncpy(s, d, bl);
|
||||
s+= bl;
|
||||
*s = 0;
|
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-modules_db_berkeley_km_bdb_lib_c,v 1.1 2012/05/09 21:27:47 sthen Exp $
|
||||
--- modules/db_berkeley/km_bdb_lib.c.orig Mon Apr 23 07:29:39 2012
|
||||
+++ modules/db_berkeley/km_bdb_lib.c Mon Apr 23 07:30:26 2012
|
||||
@@ -724,7 +724,7 @@ int km_bdblib_create_journal(table_p _tp)
|
||||
{
|
||||
char *s;
|
||||
char fn[1024];
|
||||
- char d[64];
|
||||
+ char d[128];
|
||||
FILE *fp = NULL;
|
||||
struct tm *t;
|
||||
int bl;
|
||||
@@ -745,7 +745,7 @@ int km_bdblib_create_journal(table_p _tp)
|
||||
s+=_tp->name.len;
|
||||
|
||||
t = localtime( &tim );
|
||||
- bl=strftime(d,128,"-%Y%m%d%H%M%S.jnl",t);
|
||||
+ bl=strftime(d,sizeof(d),"-%Y%m%d%H%M%S.jnl",t);
|
||||
strncpy(s, d, bl);
|
||||
s+= bl;
|
||||
*s = 0;
|
@ -0,0 +1,14 @@
|
||||
$OpenBSD: patch-modules_k_mi_xmlrpc_abyss_xmlrpc_int_h,v 1.1 2012/05/09 21:27:47 sthen Exp $
|
||||
--- modules_k/mi_xmlrpc/abyss_xmlrpc_int.h.orig Wed May 9 08:26:54 2012
|
||||
+++ modules_k/mi_xmlrpc/abyss_xmlrpc_int.h Wed May 9 08:27:26 2012
|
||||
@@ -48,8 +48,10 @@ typedef enum {
|
||||
true = 1
|
||||
} bool;
|
||||
|
||||
+#ifndef MIN
|
||||
#define MIN(a,b) ((a) < (b) ? (a) : (b))
|
||||
#define MAX(a,b) ((a) > (b) ? (a) : (b))
|
||||
+#endif /* MIN */
|
||||
|
||||
/* When we deallocate a pointer in a struct, we often replace it with
|
||||
** this and throw in a few assertions here and there. */
|
@ -1,6 +1,6 @@
|
||||
$OpenBSD: patch-modules_k_nat_traversal_nat_traversal_c,v 1.1 2012/04/22 21:44:24 sthen Exp $
|
||||
$OpenBSD: patch-modules_k_nat_traversal_nat_traversal_c,v 1.2 2012/05/09 21:27:47 sthen Exp $
|
||||
--- modules_k/nat_traversal/nat_traversal.c.orig Sun Apr 22 22:28:08 2012
|
||||
+++ modules_k/nat_traversal/nat_traversal.c Sun Apr 22 22:28:15 2012
|
||||
+++ modules_k/nat_traversal/nat_traversal.c Tue Apr 24 00:35:08 2012
|
||||
@@ -28,6 +28,8 @@
|
||||
#include <errno.h>
|
||||
#include <time.h>
|
||||
@ -10,3 +10,21 @@ $OpenBSD: patch-modules_k_nat_traversal_nat_traversal_c,v 1.1 2012/04/22 21:44:2
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include "../../sr_module.h"
|
||||
@@ -1643,7 +1645,7 @@ static void
|
||||
restore_keepalive_state(void)
|
||||
{
|
||||
char uri[64], socket[64];
|
||||
- time_t rtime, stime, now;
|
||||
+ long rtime, stime, now;
|
||||
NAT_Contact *contact;
|
||||
struct socket_info *sock;
|
||||
int port, proto, res;
|
||||
@@ -1661,7 +1663,7 @@ restore_keepalive_state(void)
|
||||
return;
|
||||
}
|
||||
|
||||
- now = time(NULL);
|
||||
+ now = (long)time(NULL);
|
||||
|
||||
res = fscanf(f, STATE_FILE_HEADER); // skip header
|
||||
|
||||
|
@ -0,0 +1,13 @@
|
||||
$OpenBSD: patch-modules_k_permissions_address_c,v 1.1 2012/05/09 21:27:47 sthen Exp $
|
||||
--- modules_k/permissions/address.c.orig Mon Apr 23 23:33:14 2012
|
||||
+++ modules_k/permissions/address.c Mon Apr 23 23:33:29 2012
|
||||
@@ -28,6 +28,9 @@
|
||||
#include <sys/types.h>
|
||||
#include <regex.h>
|
||||
#include <string.h>
|
||||
+#include <sys/types.h>
|
||||
+#include <sys/socket.h>
|
||||
+#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include "permissions.h"
|
20
telephony/kamailio/patches/patch-modules_s_usrloc_ucontact_c
Normal file
20
telephony/kamailio/patches/patch-modules_s_usrloc_ucontact_c
Normal file
@ -0,0 +1,20 @@
|
||||
$OpenBSD: patch-modules_s_usrloc_ucontact_c,v 1.1 2012/05/09 21:27:47 sthen Exp $
|
||||
--- modules_s/usrloc/ucontact.c.orig Thu Apr 19 15:10:25 2012
|
||||
+++ modules_s/usrloc/ucontact.c Mon Apr 23 23:17:24 2012
|
||||
@@ -38,6 +38,7 @@
|
||||
|
||||
#include "ucontact.h"
|
||||
#include <string.h> /* memcpy */
|
||||
+#include <sys/param.h>
|
||||
#include "../../mem/shm_mem.h"
|
||||
#include "../../ut.h"
|
||||
#include "../../dprint.h"
|
||||
@@ -49,8 +50,6 @@
|
||||
#include "ul_callback.h"
|
||||
#include "reg_avps.h"
|
||||
#include "reg_avps_db.h"
|
||||
-
|
||||
-#define MIN(x, y) ((x) < (y) ? (x) : (y))
|
||||
|
||||
/*
|
||||
* Create a new contact structure
|
@ -1,6 +1,6 @@
|
||||
$OpenBSD: patch-modules_sipcapture_sipcapture_c,v 1.1 2012/04/22 21:44:24 sthen Exp $
|
||||
$OpenBSD: patch-modules_sipcapture_sipcapture_c,v 1.2 2012/05/09 21:27:47 sthen Exp $
|
||||
--- modules/sipcapture/sipcapture.c.orig Fri Feb 3 14:37:04 2012
|
||||
+++ modules/sipcapture/sipcapture.c Fri Feb 3 14:37:49 2012
|
||||
+++ modules/sipcapture/sipcapture.c Mon Apr 23 23:04:10 2012
|
||||
@@ -48,6 +48,7 @@
|
||||
#ifndef __USE_BSD
|
||||
#define __USE_BSD /* on linux use bsd version of iphdr (more portable) */
|
||||
@ -9,3 +9,21 @@ $OpenBSD: patch-modules_sipcapture_sipcapture_c,v 1.1 2012/04/22 21:44:24 sthen
|
||||
#include <netinet/ip.h>
|
||||
#define __FAVOR_BSD /* on linux use bsd version of udphdr (more portable) */
|
||||
#include <netinet/udp.h>
|
||||
@@ -764,6 +765,7 @@ static int sip_capture_store(struct _sipcapture_object
|
||||
char tmptable[TABLE_LEN];
|
||||
int ret = 0;
|
||||
struct tm *t;
|
||||
+ time_t tmp;
|
||||
str dbtable;
|
||||
|
||||
if(sco==NULL)
|
||||
@@ -774,7 +776,8 @@ static int sip_capture_store(struct _sipcapture_object
|
||||
|
||||
gettimeofday( &tvb, &tz );
|
||||
|
||||
- t = localtime(&tvb.tv_sec);
|
||||
+ tmp = tvb.tv_sec;
|
||||
+ t = localtime(&tmp);
|
||||
|
||||
db_keys[0] = &id_column;
|
||||
db_vals[0].type = DB1_INT;
|
||||
|
Loading…
Reference in New Issue
Block a user