This updates kamailio to a much more recent version (prompted by the old
version failing to build with compilers that use -fno-common by default).

If you're using it, especially if you're using it with libressl, please
test and report back. (I can provide packages for amd64 -current if that
makes it easier..)

Index: Makefile
===================================================================
RCS file: /cvs/ports/telephony/kamailio/Makefile,v
retrieving revision 1.47
diff -u -p -r1.47 Makefile
--- Makefile    4 Feb 2021 18:43:58 -0000       1.47
+++ Makefile    4 Feb 2021 19:29:37 -0000
@@ -2,7 +2,7 @@
 
 COMMENT-main =         mature and flexible open source SIP server
 
-VERSION =              5.0.6
+VERSION =              5.4.3
 
 DISTNAME =             kamailio-${VERSION}_src
 
@@ -17,7 +17,6 @@ PKGNAME-snmpstats =   kamailio-snmpstats-$
 PKGNAME-perl =         kamailio-perl-${VERSION}
 PKGNAME-presence =     kamailio-presence-${VERSION}
 PKGNAME-radius =       kamailio-radius-${VERSION}
-REVISION =             1
 
 CATEGORIES =           telephony
 HOMEPAGE =             http://www.kamailio.org/
@@ -25,10 +24,9 @@ HOMEPAGE =           http://www.kamailio.org/
 # GPLv2+
 PERMIT_PACKAGE =       Yes
 
-SHARED_LIBS =          srdb1   4.0     # 1.0
+SHARED_LIBS =          srdb1   5.0     # 1.0
 SHARED_LIBS +=         srdb2   4.0     # 1.0
 SHARED_LIBS +=         trie    4.0     # 1.0
-SHARED_LIBS +=         srutils 3.0     # 1.0
 
 MAKE_ENV =             CC="${CC}" \
                        CC_EXTRA_OPTS="${CFLAGS} -DOPENSSL_NO_BUF_FREELISTS 
-DHAVE_ARC4RANDOM -I${LOCALBASE}/include" \
@@ -37,7 +35,8 @@ MAKE_ENV =            CC="${CC}" \
 MASTER_SITES =         http://www.kamailio.org/pub/kamailio/${VERSION}/src/
 WRKDIST =              ${WRKDIR}/kamailio-${VERSION}
 
-WANTLIB-main =         c crypto curl expat event_core event_extra iconv m \
+WANTLIB-main =         ${COMPILER_LIBCXX} \
+                       c crypto curl expat event_core event_extra iconv m \
                        pcre pthread ssl lzma xml2 curses readline unistring z
 
 LIB_DEPENDS-main =     converters/libiconv \
@@ -51,6 +50,7 @@ KAMAILIO_GROUPS =     kstandard kcpl khttp_a
 
 FLAVOR ?=
 MULTI_PACKAGES =       -main
+DEBUG_PACKAGES =       ${BUILD_PACKAGES}
 
 USE_GMAKE =            Yes
 NO_TEST =              Yes
@@ -68,15 +68,14 @@ MAKE_FLAGS =        LIBDIR=lib \
                group_include="${KAMAILIO_GROUPS}" \
                LIBsrdb1_VERSION=${LIBsrdb1_VERSION} \
                LIBsrdb2_VERSION=${LIBsrdb2_VERSION} \
-               LIBtrie_VERSION=${LIBtrie_VERSION} \
-               LIBsrutils_VERSION=${LIBsrutils_VERSION} \
+               LIBtrie_VERSION=${LIBtrie_VERSION}
 
 PSEUDO_FLAVORS +=      no_berkeley
 .if !${FLAVOR:Mno_berkeley}
 MULTI_PACKAGES +=      -berkeley
 COMMENT-berkeley =     kamailio berkeley db module
 KAMAILIO_GROUPS +=     kberkeley
-WANTLIB-berkeley =     c db pthread lib/kamailio/srdb1 lib/kamailio/srdb2
+WANTLIB-berkeley =     c db m pthread lib/kamailio/srdb1 lib/kamailio/srdb2
 LIB_DEPENDS-berkeley = databases/db/v4,-main,no_java telephony/kamailio,-main
 .endif
 
@@ -85,7 +84,7 @@ PSEUDO_FLAVORS +=     no_postgresql
 MULTI_PACKAGES +=      -postgresql
 COMMENT-postgresql =   kamailio postgresql module
 KAMAILIO_GROUPS +=     kpostgres
-WANTLIB-postgresql =   pq pthread lib/kamailio/srdb1 lib/kamailio/srdb2
+WANTLIB-postgresql =   m pq pthread lib/kamailio/srdb1 lib/kamailio/srdb2
 LIB_DEPENDS-postgresql = databases/postgresql,-main telephony/kamailio,-main
 .endif
 
@@ -94,7 +93,7 @@ PSEUDO_FLAVORS +=     no_mysql
 MULTI_PACKAGES +=      -mysql
 COMMENT-mysql =                kamailio mysql module
 KAMAILIO_GROUPS +=     kmysql
-WANTLIB-mysql =                crypto m pthread ssl z mysqlclient \
+WANTLIB-mysql =                m mariadb pthread \
                        lib/kamailio/srdb1 lib/kamailio/srdb2
 LIB_DEPENDS-mysql =    databases/mariadb,-main telephony/kamailio,-main
 .endif
@@ -104,7 +103,7 @@ PSEUDO_FLAVORS +=   no_ldap
 MULTI_PACKAGES +=      -ldap
 COMMENT-ldap =         kamailio LDAP modules
 KAMAILIO_GROUPS +=     kldap
-WANTLIB-ldap =         ldap pthread lib/kamailio/srdb2
+WANTLIB-ldap =         ldap m pthread lib/kamailio/srdb2
 LIB_DEPENDS-ldap =     databases/openldap,-main telephony/kamailio,-main
 .endif
 
@@ -123,7 +122,7 @@ PSEUDO_FLAVORS +=   no_snmpstats
 MULTI_PACKAGES +=      -snmpstats
 COMMENT-snmpstats =    kamailio snmpstats module
 KAMAILIO_GROUPS +=     ksnmpstats
-WANTLIB-snmpstats =    netsnmp netsnmpagent netsnmpmibs pthread
+WANTLIB-snmpstats =    m netsnmp netsnmpagent netsnmpmibs pthread
 LIB_DEPENDS-snmpstats =        net/net-snmp
 .endif
 
@@ -132,7 +131,7 @@ PSEUDO_FLAVORS +=   no_carrierroute
 MULTI_PACKAGES +=      -carrierroute
 COMMENT-carrierroute = kamailio carrierroute module
 KAMAILIO_GROUPS +=     kcarrierroute
-WANTLIB-carrierroute = pthread lib/kamailio/srdb1 lib/kamailio/trie
+WANTLIB-carrierroute = m pthread lib/kamailio/srdb1 lib/kamailio/trie
 LIB_DEPENDS-carrierroute = telephony/kamailio,-main
 .endif
 
@@ -151,7 +150,7 @@ MULTI_PACKAGES +=   -presence
 COMMENT-presence =     kamailio presence modules
 KAMAILIO_GROUPS +=     kpresence
 WANTLIB-presence +=    curl iconv lzma m pthread xml2 z \
-                       lib/kamailio/srdb1 lib/kamailio/srutils
+                       lib/kamailio/srdb1
 LIB_DEPENDS-presence = telephony/kamailio,-main
 .endif
 
@@ -160,7 +159,7 @@ PSEUDO_FLAVORS +=   no_radius
 MULTI_PACKAGES +=      -radius
 COMMENT-radius =       kamailio RADIUS modules
 KAMAILIO_GROUPS +=     kradius
-WANTLIB-radius =       pthread radcli
+WANTLIB-radius =       m pthread radcli
 LIB_DEPENDS-radius =   net/radcli
 .endif
 
Index: distinfo
===================================================================
RCS file: /cvs/ports/telephony/kamailio/distinfo,v
retrieving revision 1.10
diff -u -p -r1.10 distinfo
--- distinfo    20 Mar 2018 22:03:35 -0000      1.10
+++ distinfo    4 Feb 2021 19:29:37 -0000
@@ -1,2 +1,2 @@
-SHA256 (kamailio-5.0.6_src.tar.gz) = 
yhYma1WYZtWMa3fyNfvPXwcfYnSSwo8z7PWY5B2V1Co=
-SIZE (kamailio-5.0.6_src.tar.gz) = 11724268
+SHA256 (kamailio-5.4.3_src.tar.gz) = 
Lvt1avWG+mlf1l8sDx0kC8Un1rQcQn8Y4u6NrtZo+8A=
+SIZE (kamailio-5.4.3_src.tar.gz) = 12631383
Index: patches/patch-etc_kamailio_cfg
===================================================================
RCS file: /cvs/ports/telephony/kamailio/patches/patch-etc_kamailio_cfg,v
retrieving revision 1.5
diff -u -p -r1.5 patch-etc_kamailio_cfg
--- patches/patch-etc_kamailio_cfg      3 Jul 2017 22:14:20 -0000       1.5
+++ patches/patch-etc_kamailio_cfg      4 Feb 2021 19:29:37 -0000
@@ -1,8 +1,10 @@
 $OpenBSD: patch-etc_kamailio_cfg,v 1.5 2017/07/03 22:14:20 sthen Exp $
---- etc/kamailio.cfg.orig      Wed Apr  5 16:32:38 2017
-+++ etc/kamailio.cfg   Mon May 15 21:48:56 2017
-@@ -160,6 +160,9 @@ log_facility=LOG_LOCAL0
- /* number of SIP routing processes */
+
+Index: etc/kamailio.cfg
+--- etc/kamailio.cfg.orig
++++ etc/kamailio.cfg
+@@ -177,6 +177,9 @@ log_prefix="{$mt $hdr(CSeq) $ci} "
+  * - value inherited by tcp_children and sctp_children when not set 
explicitely */
  children=8
  
 +user="_kamailio"
Index: patches/patch-src_Makefile_defs
===================================================================
RCS file: /cvs/ports/telephony/kamailio/patches/patch-src_Makefile_defs,v
retrieving revision 1.4
diff -u -p -r1.4 patch-src_Makefile_defs
--- patches/patch-src_Makefile_defs     6 Apr 2020 14:48:59 -0000       1.4
+++ patches/patch-src_Makefile_defs     4 Feb 2021 19:29:37 -0000
@@ -1,20 +1,22 @@
 $OpenBSD: patch-src_Makefile_defs,v 1.4 2020/04/06 14:48:59 jca Exp $
+
 Index: src/Makefile.defs
 --- src/Makefile.defs.orig
 +++ src/Makefile.defs
-@@ -318,9 +318,9 @@ ppc_macros= __powerpc __powerpc__ __POWERPC__ __ppc__ 
+@@ -376,10 +376,10 @@ ppc_macros= __powerpc __powerpc__ __POWERPC__ __ppc__ 
  ppc64_macros= __ppc64__ _ARCH_PPC64
  
  mips_macros= __mips__ __mips _MIPS_ARCH_MIPS1
 -mips2_macros= _MIPS_ISA_MIPS2 _MIPS_ISA_MIPS3 _MIPS_ISA_MIPS4 \
 +mips2_macros= _MIPS_ISA_MIPS2 _MIPS_ISA_MIPS4 \
-                       _MIPS_ARCH_MIPS2 _MIPS_ARCH_MIPS3 _MIPS_ARCH_MIPS4
+                       _MIPS_ARCH_MIPS2 _MIPS_ARCH_MIPS3 _MIPS_ARCH_MIPS4 \
+                       _MIPS_ISA_MIPS32
 -mips64_macros= _MIPS_ISA_MIPS64 _MIPS_ARCH_MIPS64
 +mips64_macros= _MIPS_ISA_MIPS64 _MIPS_ARCH_MIPS64 _MIPS_ISA_MIPS3
  
  alpha_macros= __alpha__ __alpha _M_ALPHA_
  
-@@ -938,8 +938,8 @@ else               # CC_NAME, gcc
+@@ -991,8 +991,8 @@ else               # CC_NAME, gcc
  ifeq          ($(CC_NAME), clang)
  $(call                          set_if_empty,CPUTYPE,athlon64)
                                        C_DEFS+=-DCC_GCC_LIKE_ASM
@@ -25,7 +27,7 @@ Index: src/Makefile.defs
  else                  # CC_NAME, clang
  ifeq          ($(CC_NAME), icc)
                        C_DEFS+=-DCC_GCC_LIKE_ASM
-@@ -1031,9 +1031,8 @@ else             # CC_NAME, gcc
+@@ -1073,9 +1073,8 @@ else             # CC_NAME, gcc
  ifeq            ($(CC_NAME), clang)
  $(call                          set_if_empty,CPUTYPE,opteron)
                                        C_DEFS+=-DCC_GCC_LIKE_ASM
@@ -37,8 +39,8 @@ Index: src/Makefile.defs
  else          # CC_NAME, clang
  ifeq          ($(CC_NAME), icc)
                        C_DEFS+=-DCC_GCC_LIKE_ASM
-@@ -1130,6 +1129,9 @@ endif                    #CC_SHORTVER, 4.x
- endif                 #CC_SHORTVER, 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
+@@ -1172,6 +1171,9 @@ endif                    #CC_SHORTVER, 4.x
+ endif                 #CC_SHORTVER, 9.0+ 8.0+ 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
  
  else          #CC_NAME, gcc
 +ifeq          ($(CC_NAME), clang)
@@ -47,7 +49,7 @@ Index: src/Makefile.defs
  ifeq          ($(CC_NAME), suncc)
                        C_DEFS+=-DCC_GCC_LIKE_ASM
                        C_DEFS+=-DSPARC64_MODE
-@@ -1142,6 +1144,7 @@ else
+@@ -1184,6 +1186,7 @@ else
                                #other compilers
  $(error                       Unsupported compiler ($(CC):$(CC_NAME)), try 
gcc)
  endif         #CC_NAME, suncc
Index: patches/patch-src_Makefile_rules
===================================================================
RCS file: patches/patch-src_Makefile_rules
diff -N patches/patch-src_Makefile_rules
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_Makefile_rules    4 Feb 2021 19:29:37 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: src/Makefile.rules
+--- src/Makefile.rules.orig
++++ src/Makefile.rules
+@@ -44,7 +44,7 @@ ALLDEP+=makecfg.lst
+ crt_type=$(if $(MOD_NAME),M,$(if $(LIB_NAME),L,$(if $(UTIL_NAME),U)))
+ 
+ cmd_CC=$(CC) $(CFLAGS) $(C_INCLUDES) $(INCLUDES) $(C_DEFS) $(DEFS) -c $< -o $@
+-cmd_LD=$(LD) $(LDFLAGS) $(objs) $(extra_objs) $(ALL_LIBS) $(SER_RPATH) \
++cmd_LD=$(LD) $(LDFLAGS) -lm $(objs) $(extra_objs) $(ALL_LIBS) $(SER_RPATH) \
+       -o $(NAME)
+ 
+ ifeq (,$(CC_MKDEP_OPTS))
Index: patches/patch-src_core_list_h
===================================================================
RCS file: /cvs/ports/telephony/kamailio/patches/patch-src_core_list_h,v
retrieving revision 1.1
diff -u -p -r1.1 patch-src_core_list_h
--- patches/patch-src_core_list_h       3 Jul 2017 22:14:20 -0000       1.1
+++ patches/patch-src_core_list_h       4 Feb 2021 19:29:37 -0000
@@ -1,11 +1,13 @@
 $OpenBSD: patch-src_core_list_h,v 1.1 2017/07/03 22:14:20 sthen Exp $
---- src/core/list.h.orig       Mon May 15 22:31:06 2017
-+++ src/core/list.h    Mon May 15 22:34:38 2017
+
+Index: src/core/list.h
+--- src/core/list.h.orig
++++ src/core/list.h
 @@ -33,6 +33,8 @@
  #ifndef _SER_LIST_H
  #define       _SER_LIST_H
  
-+#include <sys/queue.h>
++// #include <sys/queue.h>
 +
  /* #include <sys/cdefs.h> - not needed and not present on all the systems */
  
@@ -18,23 +20,27 @@ $OpenBSD: patch-src_core_list_h,v 1.1 20
  /*
   * Singly-linked List declarations.
   */
-@@ -204,6 +207,7 @@ struct {                                                   
        \
+@@ -204,7 +207,9 @@ struct {                                                   
        \
  #define       SLIST_REMOVE_HEAD(head, field) do {                             
\
        SLIST_FIRST((head)) = SLIST_NEXT(SLIST_FIRST((head)), field);   \
  } while (0)
 +#endif /* SLIST_HEAD */
  
++#ifndef STAILQ_HEAD
  /*
   * Singly-linked Tail queue declarations.
-@@ -300,6 +304,7 @@ struct {                                                   
        \
+  */
+@@ -299,7 +304,9 @@ struct {                                                   
        \
+            STAILQ_NEXT(STAILQ_FIRST((head)), field)) == NULL)         \
                (head)->stqh_last = &STAILQ_FIRST((head));              \
  } while (0)
++#endif /* STAILQ_HEAD */
  
 +#ifndef LIST_HEAD
  /*
   * List declarations.
   */
-@@ -513,5 +518,6 @@ struct {                                                   
        \
+@@ -513,5 +520,6 @@ struct {                                                   
        \
        TRASHIT((elm)->field.tqe_prev);                                 \
        QMD_TRACE_ELEM(&(elm)->field);                                  \
  } while (0)
Index: patches/patch-src_core_msg_translator_c
===================================================================
RCS file: patches/patch-src_core_msg_translator_c
diff -N patches/patch-src_core_msg_translator_c
--- patches/patch-src_core_msg_translator_c     21 Sep 2017 09:34:32 -0000      
1.2
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,24 +0,0 @@
-$OpenBSD: patch-src_core_msg_translator_c,v 1.2 2017/09/21 09:34:32 sthen Exp $
-Index: src/core/msg_translator.c
---- src/core/msg_translator.c.orig
-+++ src/core/msg_translator.c
-@@ -522,7 +522,11 @@ static inline int lump_check_opt( struct lump *l,
-                               return 1;
-                       }
-               case COND_IF_RAND:
-+#ifdef HAVE_ARC4RANDOM
-+                      if(arc4random()>=KAM_RAND_MAX/2) {
-+#else
-                       if(kam_rand()>=KAM_RAND_MAX/2) {
-+#endif
-                               LUMP_SET_COND_TRUE(l);
-                               return 1;
-                       } else return 0;
-@@ -2320,6 +2324,7 @@ char * build_res_buf_from_sip_req( unsigned int code, 
- 
-       body = 0;
-       buf=0;
-+      pvia=0;
-       received_buf=rport_buf=warning_buf=content_len_buf=0;
-       received_len=rport_len=warning_len=content_len_len=0;
- 
Index: patches/patch-src_core_pt_c
===================================================================
RCS file: patches/patch-src_core_pt_c
diff -N patches/patch-src_core_pt_c
--- patches/patch-src_core_pt_c 20 Mar 2018 22:03:35 -0000      1.3
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,72 +0,0 @@
-$OpenBSD: patch-src_core_pt_c,v 1.3 2018/03/20 22:03:35 sthen Exp $
-Index: src/core/pt.c
---- src/core/pt.c.orig
-+++ src/core/pt.c
-@@ -255,8 +255,10 @@ int fork_process(int child_id, char *desc, int make_so
- {
-       int pid, child_process_no;
-       int ret;
-+#ifndef HAVE_ARC4RANDOM
-       unsigned int new_seed1;
-       unsigned int new_seed2;
-+#endif
- #ifdef USE_TCP
-       int sockfd[2];
- #endif
-@@ -295,8 +297,10 @@ int fork_process(int child_id, char *desc, int make_so
-       }
- 
-       child_process_no = *process_count;
-+#ifndef HAVE_ARC4RANDOM
-       new_seed1=kam_rand();
-       new_seed2=random();
-+#endif
-       pid = fork();
-       if (pid<0) {
-               lock_release(process_lock);
-@@ -311,9 +315,11 @@ int fork_process(int child_id, char *desc, int make_so
- #ifdef USE_TCP
-               close_extra_socks(child_id, process_no);
- #endif /* USE_TCP */
-+#ifndef HAVE_ARC4RANDOM
-               kam_srand(new_seed1);
-               fastrand_seed(kam_rand());
-               srandom(new_seed2+time(0));
-+#endif
-               shm_malloc_on_fork();
- #ifdef PROFILING
-               monstartup((u_long) &_start, (u_long) &etext);
-@@ -390,8 +396,10 @@ int fork_tcp_process(int child_id, char *desc, int r, 
-       int reader_fd[2]; /* for comm. with the tcp children read  */
-       int ret;
-       int i;
-+#ifndef HAVE_ARC4RANDOM
-       unsigned int new_seed1;
-       unsigned int new_seed2;
-+#endif
- 
-       /* init */
-       sockfd[0]=sockfd[1]=-1;
-@@ -429,8 +437,10 @@ int fork_tcp_process(int child_id, char *desc, int r, 
-       }
- 
-       child_process_no = *process_count;
-+#ifndef HAVE_ARC4RANDOM
-       new_seed1=kam_rand();
-       new_seed2=random();
-+#endif
-       pid = fork();
-       if (pid<0) {
-               lock_release(process_lock);
-@@ -452,9 +462,11 @@ int fork_tcp_process(int child_id, char *desc, int r, 
-                       }
-               }
-               daemon_status_on_fork_cleanup();
-+#ifndef HAVE_ARC4RANDOM
-               kam_srand(new_seed1);
-               fastrand_seed(kam_rand());
-               srandom(new_seed2+time(0));
-+#endif
-               shm_malloc_on_fork();
- #ifdef PROFILING
-               monstartup((u_long) &_start, (u_long) &etext);
Index: patches/patch-src_core_rand_fastrand_c
===================================================================
RCS file: /cvs/ports/telephony/kamailio/patches/patch-src_core_rand_fastrand_c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-src_core_rand_fastrand_c
--- patches/patch-src_core_rand_fastrand_c      3 Jul 2017 22:14:20 -0000       
1.1
+++ patches/patch-src_core_rand_fastrand_c      4 Feb 2021 19:29:37 -0000
@@ -1,7 +1,9 @@
 $OpenBSD: patch-src_core_rand_fastrand_c,v 1.1 2017/07/03 22:14:20 sthen Exp $
---- src/core/rand/fastrand.c.orig      Mon May 15 22:48:56 2017
-+++ src/core/rand/fastrand.c   Mon May 15 22:50:19 2017
-@@ -25,6 +25,18 @@
+
+Index: src/core/rand/fastrand.c
+--- src/core/rand/fastrand.c.orig
++++ src/core/rand/fastrand.c
+@@ -23,6 +23,23 @@
  #include "fastrand.h"
  
  #include <stdlib.h>
@@ -16,11 +18,16 @@ $OpenBSD: patch-src_core_rand_fastrand_c
 +{
 +      return arc4random_uniform(max+1);
 +}
++
++void fastrand_seed(unsigned int seed)
++{
++      return;
++}
 +#else
  #include "isaac/rand.h"
  
  #define FASTRAND_MAX  ((unsigned int)(-1))
-@@ -54,3 +66,4 @@ unsigned int fastrand_max(unsigned int max)
+@@ -52,3 +69,4 @@ unsigned int fastrand_max(unsigned int max)
  {
        return fastrand()%(max+1);
  }
Index: patches/patch-src_core_rand_fastrand_h
===================================================================
RCS file: patches/patch-src_core_rand_fastrand_h
diff -N patches/patch-src_core_rand_fastrand_h
--- patches/patch-src_core_rand_fastrand_h      3 Jul 2017 22:14:20 -0000       
1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-$OpenBSD: patch-src_core_rand_fastrand_h,v 1.1 2017/07/03 22:14:20 sthen Exp $
---- src/core/rand/fastrand.h.orig      Mon May 15 22:50:42 2017
-+++ src/core/rand/fastrand.h   Mon May 15 22:51:20 2017
-@@ -22,9 +22,10 @@
- #ifndef _fastrand_h
- #define _fastrand_h
- 
--
-+#ifndef HAVE_ARC4RANDOM
- /* side effect: seeds also random w/ seed */
- void fastrand_seed(unsigned int seed);
-+#endif
- /* generate a 32 bit random number */
- unsigned int fastrand(void);
- /* generate a random number between 0 and max inclusive ( 0 <= r <= max)
Index: patches/patch-src_core_select_core_c
===================================================================
RCS file: patches/patch-src_core_select_core_c
diff -N patches/patch-src_core_select_core_c
--- patches/patch-src_core_select_core_c        3 Jul 2017 22:14:20 -0000       
1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-$OpenBSD: patch-src_core_select_core_c,v 1.1 2017/07/03 22:14:20 sthen Exp $
---- src/core/select_core.c.orig        Mon May 15 22:51:55 2017
-+++ src/core/select_core.c     Mon May 15 22:53:45 2017
-@@ -1513,7 +1513,11 @@ int select_sys_unique(str* res, select_t* s, struct si
-               for (i = UNIQUE_ID_FIX_LEN, cb = 0, x = 0; i < 
UNIQUE_ID_FIX_LEN+UNIQUE_ID_RAND_LEN; i++) {
-                       if (!cb) {
-                               cb = rb;
-+#ifdef HAVE_ARC4RANDOM
-+                              x = arc4random();
-+#else
-                               x = kam_rand();
-+#endif
-                       }
-                       uniq_id[i] = fourbits2char[x & 0x0F];
-                       x >>= rb;
Index: patches/patch-src_core_tcp_read_c
===================================================================
RCS file: /cvs/ports/telephony/kamailio/patches/patch-src_core_tcp_read_c,v
retrieving revision 1.3
diff -u -p -r1.3 patch-src_core_tcp_read_c
--- patches/patch-src_core_tcp_read_c   20 Mar 2018 22:03:35 -0000      1.3
+++ patches/patch-src_core_tcp_read_c   4 Feb 2021 19:29:37 -0000
@@ -3,7 +3,7 @@ $OpenBSD: patch-src_core_tcp_read_c,v 1.
 Index: src/core/tcp_read.c
 --- src/core/tcp_read.c.orig
 +++ src/core/tcp_read.c
-@@ -1530,6 +1530,14 @@ void release_tcpconn(struct tcp_connection* c, long st
+@@ -1677,6 +1677,14 @@ void release_tcpconn(struct tcp_connection* c, long st
                                ip_addr2a(&c->rcv.src_ip), c->rcv.src_port,
                                ip_addr2a(&c->rcv.dst_ip), c->rcv.dst_port);
                LM_DBG("extra_data %p\n", c->extra_data);
Index: patches/patch-src_core_timer_c
===================================================================
RCS file: patches/patch-src_core_timer_c
diff -N patches/patch-src_core_timer_c
--- patches/patch-src_core_timer_c      3 Jul 2017 22:14:20 -0000       1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-$OpenBSD: patch-src_core_timer_c,v 1.1 2017/07/03 22:14:20 sthen Exp $
---- src/core/timer.c.orig      Mon May 15 22:55:54 2017
-+++ src/core/timer.c   Mon May 15 22:57:05 2017
-@@ -244,7 +244,11 @@ int init_timer()
- 
-       /* initial values */
-       memset(timer_lst, 0, sizeof(struct timer_lists));
-+#ifdef HAVE_ARC4RANDOM
-+      *ticks=arc4random();
-+#else
-       *ticks=random(); /* random value for start, for debugging */
-+#endif
-       prev_ticks=last_ticks=last_adj_check=*ticks;
-       *running_timer=0;
-       if (gettimeofday(&start_time, 0)<0){
Index: patches/patch-src_lib_srutils_Makefile
===================================================================
RCS file: patches/patch-src_lib_srutils_Makefile
diff -N patches/patch-src_lib_srutils_Makefile
--- patches/patch-src_lib_srutils_Makefile      3 Jul 2017 22:14:20 -0000       
1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-$OpenBSD: patch-src_lib_srutils_Makefile,v 1.1 2017/07/03 22:14:20 sthen Exp $
---- src/lib/srutils/Makefile.orig      Mon May 15 23:15:29 2017
-+++ src/lib/srutils/Makefile   Mon May 15 23:15:43 2017
-@@ -4,6 +4,7 @@ NAME:=srutils
- MAJOR_VER=1
- MINOR_VER=0
- BUGFIX_VER=0
-+OBSD_VER=$(LIBsrutils_VERSION)
- LIBS= -lm
- 
- include ../../Makefile.libs
Index: patches/patch-src_main_c
===================================================================
RCS file: patches/patch-src_main_c
diff -N patches/patch-src_main_c
--- patches/patch-src_main_c    21 Sep 2017 09:34:32 -0000      1.2
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,31 +0,0 @@
-$OpenBSD: patch-src_main_c,v 1.2 2017/09/21 09:34:32 sthen Exp $
-Index: src/main.c
---- src/main.c.orig
-+++ src/main.c
-@@ -1842,8 +1842,10 @@ int main(int argc, char** argv)
-       int proto;
-       char *options;
-       int ret;
-+#ifndef HAVE_ARC4RANDOM
-       unsigned int seed;
-       int rfd;
-+#endif
-       int debug_save, debug_flag;
-       int dont_fork_cnt;
-       struct name_lst* n_lst;
-@@ -2109,6 +2111,7 @@ int main(int argc, char** argv)
-               goto error;
-       }
- 
-+#ifndef HAVE_ARC4RANDOM
-       /* seed the prng */
-       /* try to use /dev/urandom if possible */
-       seed=0;
-@@ -2129,6 +2132,7 @@ try_again:
-       fastrand_seed(kam_rand());
-       srandom(kam_rand()+time(0));
-       LM_DBG("test random numbers %u %lu %u\n", kam_rand(), random(), 
fastrand());
-+#endif
- 
-       /*register builtin  modules*/
-       register_builtin_modules();
Index: patches/patch-src_modules_app_jsdt_duk_config_h
===================================================================
RCS file: patches/patch-src_modules_app_jsdt_duk_config_h
diff -N patches/patch-src_modules_app_jsdt_duk_config_h
--- patches/patch-src_modules_app_jsdt_duk_config_h     10 Aug 2017 18:40:21 
-0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,19 +0,0 @@
-$OpenBSD: patch-src_modules_app_jsdt_duk_config_h,v 1.1 2017/08/10 18:40:21 
jca Exp $
-
-We do have inttypes.h, but gcc-4.2.1 doesn't default to C99 and
-thus doesn't #define __STDC_VERSION__ 199901L.
-
-Index: src/modules/app_jsdt/duk_config.h
---- src/modules/app_jsdt/duk_config.h.orig
-+++ src/modules/app_jsdt/duk_config.h
-@@ -1557,6 +1557,10 @@
- #define DUK_F_HAVE_INTTYPES
- #endif
- 
-+#ifndef DUK_F_HAVE_INTTYPES
-+#define DUK_F_HAVE_INTTYPES
-+#endif
-+
- /* Basic integer typedefs and limits, preferably from inttypes.h, otherwise
-  * through automatic detection.
-  */
Index: patches/patch-src_modules_auth_identity_auth_identity_c
===================================================================
RCS file: 
/cvs/ports/telephony/kamailio/patches/patch-src_modules_auth_identity_auth_identity_c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-src_modules_auth_identity_auth_identity_c
--- patches/patch-src_modules_auth_identity_auth_identity_c     3 Jul 2017 
22:14:20 -0000       1.1
+++ patches/patch-src_modules_auth_identity_auth_identity_c     4 Feb 2021 
19:29:37 -0000
@@ -3,7 +3,7 @@ $OpenBSD: patch-src_modules_auth_identit
 Index: src/modules/auth_identity/auth_identity.c
 --- src/modules/auth_identity/auth_identity.c.orig
 +++ src/modules/auth_identity/auth_identity.c
-@@ -590,7 +590,7 @@ static int check_date(struct sip_msg* msg, char* srt1,
+@@ -591,7 +591,7 @@ static int check_date(struct sip_msg* msg, char* srt1,
        }
  
        if (tnow > tmsg + glb_iauthval) {
Index: patches/patch-src_modules_db_berkeley_Makefile
===================================================================
RCS file: 
/cvs/ports/telephony/kamailio/patches/patch-src_modules_db_berkeley_Makefile,v
retrieving revision 1.1
diff -u -p -r1.1 patch-src_modules_db_berkeley_Makefile
--- patches/patch-src_modules_db_berkeley_Makefile      3 Jul 2017 22:14:20 
-0000       1.1
+++ patches/patch-src_modules_db_berkeley_Makefile      4 Feb 2021 19:29:37 
-0000
@@ -1,25 +1,18 @@
 $OpenBSD: patch-src_modules_db_berkeley_Makefile,v 1.1 2017/07/03 22:14:20 
sthen Exp $
---- src/modules/db_berkeley/Makefile.orig      Mon May 15 23:31:59 2017
-+++ src/modules/db_berkeley/Makefile   Mon May 15 23:33:10 2017
+
+Index: src/modules/db_berkeley/Makefile
+--- src/modules/db_berkeley/Makefile.orig
++++ src/modules/db_berkeley/Makefile
 @@ -10,10 +10,10 @@ NAME=db_berkeley.so
  # extra debug messages
  # -DBDB_EXTRA_DEBUG is optional
- DEFS +=-DSER_MOD_INTERFACE -I$(LOCALBASE)/include 
-I$(LOCALBASE)/BerkeleyDB.4.6/include \
+ DEFS +=-I$(LOCALBASE)/include -I$(LOCALBASE)/BerkeleyDB.4.6/include \
 -      -I$(SYSBASE)/include
 +      -I$(SYSBASE)/include -I$(LOCALBASE)/include/db4
  
  
 -LIBS=-L$(LOCALBASE)/lib -L$(SYSBASE)/lib -L$(LOCALBASE)/BerkeleyDB.4.6/lib 
-ldb
-+LIBS=-L$(LOCALBASE)/lib -L$(SYSBASE)/lib -L$(LOCALBASE)/BerkeleyDB.4.6/lib 
-L$(LOCALBASE)/lib/db4 -ldb
++LIBS=-L$(LOCALBASE)/lib -L$(SYSBASE)/lib -L$(LOCALBASE)/lib/db4 -ldb
  
  SERLIBPATH=../../lib
  SER_LIBS=$(SERLIBPATH)/srdb2/srdb1
-@@ -25,7 +25,7 @@ ifeq ($(INSTALL_FLAVOUR),kamailio)
- # extra install for kamailio
- 
- install-berkeley-scripts: $(bin_prefix)/$(bin_dir)
--              BERKELEYDBON=yes make -C ../../../utils/kamctl/ install-modules
-+              BERKELEYDBON=yes $(MAKE) -C ../../../utils/kamctl/ 
install-modules
- 
- install-scripts: install-berkeley-scripts
- 
Index: patches/patch-src_modules_db_berkeley_bdb_lib_c
===================================================================
RCS file: 
/cvs/ports/telephony/kamailio/patches/patch-src_modules_db_berkeley_bdb_lib_c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-src_modules_db_berkeley_bdb_lib_c
--- patches/patch-src_modules_db_berkeley_bdb_lib_c     3 Jul 2017 22:14:20 
-0000       1.1
+++ patches/patch-src_modules_db_berkeley_bdb_lib_c     4 Feb 2021 19:29:37 
-0000
@@ -1,7 +1,9 @@
 $OpenBSD: patch-src_modules_db_berkeley_bdb_lib_c,v 1.1 2017/07/03 22:14:20 
sthen Exp $
---- src/modules/db_berkeley/bdb_lib.c.orig     Mon May 15 23:34:21 2017
-+++ src/modules/db_berkeley/bdb_lib.c  Mon May 15 23:34:56 2017
-@@ -666,7 +666,7 @@ int bdblib_create_journal(bdb_db_p _db_p, bdb_table_p 
+
+Index: src/modules/db_berkeley/bdb_lib.c
+--- src/modules/db_berkeley/bdb_lib.c.orig
++++ src/modules/db_berkeley/bdb_lib.c
+@@ -623,7 +623,7 @@ int bdblib_create_journal(bdb_db_p _db_p, bdb_table_p 
  {
        char *s;
        char fn[1024];
@@ -10,12 +12,3 @@ $OpenBSD: patch-src_modules_db_berkeley_
        FILE *fp = NULL;
        struct tm *t;
        int bl;
-@@ -686,7 +686,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;
Index: patches/patch-src_modules_db_berkeley_km_bdb_lib_c
===================================================================
RCS file: 
/cvs/ports/telephony/kamailio/patches/patch-src_modules_db_berkeley_km_bdb_lib_c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-src_modules_db_berkeley_km_bdb_lib_c
--- patches/patch-src_modules_db_berkeley_km_bdb_lib_c  3 Jul 2017 22:14:20 
-0000       1.1
+++ patches/patch-src_modules_db_berkeley_km_bdb_lib_c  4 Feb 2021 19:29:37 
-0000
@@ -1,7 +1,9 @@
 $OpenBSD: patch-src_modules_db_berkeley_km_bdb_lib_c,v 1.1 2017/07/03 22:14:20 
sthen Exp $
---- src/modules/db_berkeley/km_bdb_lib.c.orig  Mon May 15 23:35:24 2017
-+++ src/modules/db_berkeley/km_bdb_lib.c       Mon May 15 23:36:06 2017
-@@ -719,7 +719,7 @@ int km_bdblib_create_journal(table_p _tp)
+
+Index: src/modules/db_berkeley/km_bdb_lib.c
+--- src/modules/db_berkeley/km_bdb_lib.c.orig
++++ src/modules/db_berkeley/km_bdb_lib.c
+@@ -676,7 +676,7 @@ int km_bdblib_create_journal(table_p _tp)
  {
        char *s;
        char fn[1024];
@@ -10,12 +12,3 @@ $OpenBSD: patch-src_modules_db_berkeley_
        FILE *fp = NULL;
        struct tm *t;
        int bl;
-@@ -740,7 +740,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;
Index: patches/patch-src_modules_ipops_detailed_ip_type_c
===================================================================
RCS file: 
/cvs/ports/telephony/kamailio/patches/patch-src_modules_ipops_detailed_ip_type_c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-src_modules_ipops_detailed_ip_type_c
--- patches/patch-src_modules_ipops_detailed_ip_type_c  3 Jul 2017 22:14:20 
-0000       1.1
+++ patches/patch-src_modules_ipops_detailed_ip_type_c  4 Feb 2021 19:29:37 
-0000
@@ -3,7 +3,7 @@ $OpenBSD: patch-src_modules_ipops_detail
 Index: src/modules/ipops/detailed_ip_type.c
 --- src/modules/ipops/detailed_ip_type.c.orig
 +++ src/modules/ipops/detailed_ip_type.c
-@@ -26,7 +26,7 @@
+@@ -24,7 +24,7 @@
  #include <stdio.h>
  #include <stdlib.h>
  #include <arpa/inet.h>
Index: patches/patch-src_modules_nat_traversal_nat_traversal_c
===================================================================
RCS file: 
/cvs/ports/telephony/kamailio/patches/patch-src_modules_nat_traversal_nat_traversal_c,v
retrieving revision 1.3
diff -u -p -r1.3 patch-src_modules_nat_traversal_nat_traversal_c
--- patches/patch-src_modules_nat_traversal_nat_traversal_c     20 Mar 2018 
22:03:35 -0000      1.3
+++ patches/patch-src_modules_nat_traversal_nat_traversal_c     4 Feb 2021 
19:29:37 -0000
@@ -3,12 +3,12 @@ $OpenBSD: patch-src_modules_nat_traversa
 Index: src/modules/nat_traversal/nat_traversal.c
 --- src/modules/nat_traversal/nat_traversal.c.orig
 +++ src/modules/nat_traversal/nat_traversal.c
-@@ -1724,7 +1724,7 @@ restore_keepalive_state(void)
-     res = fscanf(f, STATE_FILE_HEADER); // skip header
+@@ -1719,7 +1719,7 @@ static void restore_keepalive_state(void)
+       res = fscanf(f, STATE_FILE_HEADER); // skip header
  
-     while (true) {
--        res = fscanf(f, "%63s %63s %ld %ld", uri, socket, &rtime, &stime);
-+        res = fscanf(f, "%63s %63s %lld %lld", uri, socket, &rtime, &stime);
-         if (res == EOF) {
-             if (ferror(f))
-                 LM_ERR("error while reading keepalive state file: %s\n", 
strerror(errno));
+       while(true) {
+-              res = fscanf(f, "%63s %63s %ld %ld", uri, socket, &rtime, 
&stime);
++              res = fscanf(f, "%63s %63s %lld %lld", uri, socket, &rtime, 
&stime);
+               if(res == EOF) {
+                       if(ferror(f))
+                               LM_ERR("error while reading keepalive state 
file: %s\n",
Index: patches/patch-src_modules_tls_tls_bio_c
===================================================================
RCS file: 
/cvs/ports/telephony/kamailio/patches/patch-src_modules_tls_tls_bio_c,v
retrieving revision 1.2
diff -u -p -r1.2 patch-src_modules_tls_tls_bio_c
--- patches/patch-src_modules_tls_tls_bio_c     20 Mar 2018 22:03:35 -0000      
1.2
+++ patches/patch-src_modules_tls_tls_bio_c     4 Feb 2021 19:29:37 -0000
@@ -3,19 +3,9 @@ $OpenBSD: patch-src_modules_tls_tls_bio_
 Index: src/modules/tls/tls_bio.c
 --- src/modules/tls/tls_bio.c.orig
 +++ src/modules/tls/tls_bio.c
-@@ -63,7 +63,8 @@ static int tls_bio_mbuf_puts(BIO* b, const char* s);
- static long tls_bio_mbuf_ctrl(BIO* b, int cmd, long arg1, void* arg2);
- 
+@@ -102,6 +102,19 @@ static void BIO_set_init(BIO *b, int init)
+ #endif
  
--#if OPENSSL_VERSION_NUMBER < 0x010100000L || defined(LIBRESSL_VERSION_NUMBER)
-+#if OPENSSL_VERSION_NUMBER < 0x010100000L || \
-+    (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 
0x2070000fL)
- static BIO_METHOD tls_mbuf_method = {
-       BIO_TYPE_TLS_MBUF,      /* type */
-       "sr_tls_mbuf",          /* name */
-@@ -98,6 +99,19 @@ static void BIO_set_init(BIO *b, int init)
-       b->init = init;
- }
  #else
 +#if defined(LIBRESSL_VERSION_NUMBER)
 +/*
@@ -33,13 +23,3 @@ Index: src/modules/tls/tls_bio.c
  static BIO_METHOD *tls_mbuf_method = NULL;
  #endif
  
-@@ -105,7 +119,8 @@ static BIO_METHOD *tls_mbuf_method = NULL;
- /** returns a custom tls_mbuf BIO. */
- BIO_METHOD* tls_BIO_mbuf(void)
- {
--#if OPENSSL_VERSION_NUMBER < 0x010100000L || defined(LIBRESSL_VERSION_NUMBER)
-+#if OPENSSL_VERSION_NUMBER < 0x010100000L || \
-+    (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 
0x2070000fL)
-       return &tls_mbuf_method;
- #else
-       if(tls_mbuf_method != NULL) {
Index: patches/patch-src_modules_tls_tls_domain_c
===================================================================
RCS file: 
/cvs/ports/telephony/kamailio/patches/patch-src_modules_tls_tls_domain_c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-src_modules_tls_tls_domain_c
--- patches/patch-src_modules_tls_tls_domain_c  21 Sep 2017 09:34:32 -0000      
1.1
+++ patches/patch-src_modules_tls_tls_domain_c  4 Feb 2021 19:29:37 -0000
@@ -1,27 +1,9 @@
-$OpenBSD: patch-src_modules_tls_tls_domain_c,v 1.1 2017/09/21 09:34:32 sthen 
Exp $
+$OpenBSD$
 
 Index: src/modules/tls/tls_domain.c
 --- src/modules/tls/tls_domain.c.orig
 +++ src/modules/tls/tls_domain.c
-@@ -734,7 +734,7 @@ static void sr_ssl_ctx_info_callback(const SSL *ssl, i
-               if(data==0)
-                       data = (struct tls_extra_data*)SSL_get_app_data(ssl);
-               LOG(tls_dbg, "SSL handshake done\n");
--#if OPENSSL_VERSION_NUMBER < 0x010100000L
-+#if OPENSSL_VERSION_NUMBER < 0x010100000L || defined(LIBRESSL_VERSION_NUMBER)
-               /* CVE-2009-3555 - disable renegotiation */
-               if (ssl->s3) {
-                       LOG(tls_dbg, "SSL disable renegotiation\n");
-@@ -858,7 +858,7 @@ static int tls_ssl_ctx_mode(SSL_CTX* ctx, long mode, v
-  */
- static int tls_ssl_ctx_set_freelist(SSL_CTX* ctx, long val, void* unused)
- {
--#if OPENSSL_VERSION_NUMBER < 0x010100000L
-+#if OPENSSL_VERSION_NUMBER < 0x010100000L || defined(LIBRESSL_VERSION_NUMBER)
-       if (val >= 0)
- #if OPENSSL_VERSION_NUMBER >= 0x01000000L
- #ifndef OPENSSL_NO_BUF_FREELISTS
-@@ -997,7 +997,7 @@ static int fix_domain(tls_domain_t* d, tls_domain_t* d
+@@ -1028,7 +1028,7 @@ static int ksr_tls_fix_domain(tls_domain_t* d, tls_dom
        memset(d->ctx, 0, sizeof(SSL_CTX*) * procs_no);
        for(i = 0; i < procs_no; i++) {
  
Index: patches/patch-src_modules_tls_tls_init_c
===================================================================
RCS file: 
/cvs/ports/telephony/kamailio/patches/patch-src_modules_tls_tls_init_c,v
retrieving revision 1.2
diff -u -p -r1.2 patch-src_modules_tls_tls_init_c
--- patches/patch-src_modules_tls_tls_init_c    21 Sep 2017 09:34:32 -0000      
1.2
+++ patches/patch-src_modules_tls_tls_init_c    4 Feb 2021 19:29:37 -0000
@@ -1,9 +1,9 @@
-$OpenBSD: patch-src_modules_tls_tls_init_c,v 1.2 2017/09/21 09:34:32 sthen Exp 
$
+$OpenBSD$
 
 Index: src/modules/tls/tls_init.c
 --- src/modules/tls/tls_init.c.orig
 +++ src/modules/tls/tls_init.c
-@@ -119,7 +119,7 @@ to compile on the  _target_ system)"
+@@ -119,7 +119,7 @@ static int tls_mod_initialized = 0;
  int openssl_kssl_malloc_bug=0; /* is openssl bug #1467 present ? */
  #endif
  
@@ -12,127 +12,28 @@ Index: src/modules/tls/tls_init.c
  const SSL_METHOD* ssl_methods[TLS_METHOD_MAX];
  #else
  sr_tls_methods_t sr_tls_methods[TLS_METHOD_MAX];
-@@ -143,7 +143,7 @@ sr_tls_methods_t sr_tls_methods[TLS_METHOD_MAX];
- */
- 
- 
--
-+#ifndef LIBRESSL_VERSION_NUMBER
- inline static char* buf_append(char* buf, char* end, char* str, int str_len)
- {
-       if ( (buf+str_len)<end){
-@@ -321,6 +321,7 @@ static void ser_free(void *ptr, const char *fname, int
- }
- #endif
- 
-+#endif /* LIBRESSL_VERSION_NUMBER */
- 
- /*
-  * Initialize TLS socket
-@@ -356,7 +357,7 @@ error:
+@@ -361,7 +361,7 @@ error:
   */
  static void init_ssl_methods(void)
  {
 -#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
++#if OPENSSL_VERSION_NUMBER < 0x010100000L || defined(LIBRESSL_VERSION_NUMBER)
        /* libssl < 1.1.0 */
        memset(ssl_methods, 0, sizeof(ssl_methods));
  
-@@ -366,7 +367,7 @@ static void init_ssl_methods(void)
-       ssl_methods[TLS_USE_SSLv23 - 1] = SSLv23_method();
- 
-       /* only specific SSL or TLS version */
--#if OPENSSL_VERSION_NUMBER < 0x010100000L
-+#if OPENSSL_VERSION_NUMBER < 0x010100000L || defined(LIBRESSL_VERSION_NUMBER)
- #ifndef OPENSSL_NO_SSL2
-       ssl_methods[TLS_USE_SSLv2_cli - 1] = SSLv2_client_method();
-       ssl_methods[TLS_USE_SSLv2_srv - 1] = SSLv2_server_method();
-@@ -384,13 +385,13 @@ static void init_ssl_methods(void)
+@@ -389,13 +389,13 @@ static void init_ssl_methods(void)
        ssl_methods[TLS_USE_TLSv1_srv - 1] = TLSv1_server_method();
        ssl_methods[TLS_USE_TLSv1 - 1] = TLSv1_method();
  
--#if OPENSSL_VERSION_NUMBER >= 0x1000100fL
-+#if OPENSSL_VERSION_NUMBER >= 0x1000100fL && !defined(LIBRESSL_VERSION_NUMBER)
+-#if OPENSSL_VERSION_NUMBER >= 0x1000100fL && !defined(LIBRESSL_VERSION_NUMBER)
++#if OPENSSL_VERSION_NUMBER >= 0x1000100fL
        ssl_methods[TLS_USE_TLSv1_1_cli - 1] = TLSv1_1_client_method();
        ssl_methods[TLS_USE_TLSv1_1_srv - 1] = TLSv1_1_server_method();
        ssl_methods[TLS_USE_TLSv1_1 - 1] = TLSv1_1_method();
  #endif
  
--#if OPENSSL_VERSION_NUMBER >= 0x1000105fL
-+#if OPENSSL_VERSION_NUMBER >= 0x1000105fL && !defined(LIBRESSL_VERSION_NUMBER)
+-#if OPENSSL_VERSION_NUMBER >= 0x1000105fL && !defined(LIBRESSL_VERSION_NUMBER)
++#if OPENSSL_VERSION_NUMBER >= 0x1000105fL
        ssl_methods[TLS_USE_TLSv1_2_cli - 1] = TLSv1_2_client_method();
        ssl_methods[TLS_USE_TLSv1_2_srv - 1] = TLSv1_2_server_method();
        ssl_methods[TLS_USE_TLSv1_2 - 1] = TLSv1_2_method();
-@@ -399,11 +400,11 @@ static void init_ssl_methods(void)
-       /* ranges of TLS versions (require a minimum TLS version) */
-       ssl_methods[TLS_USE_TLSv1_PLUS - 1] = (void*)TLS_OP_TLSv1_PLUS;
- 
--#if OPENSSL_VERSION_NUMBER >= 0x1000100fL
-+#if OPENSSL_VERSION_NUMBER >= 0x1000100fL && !defined(LIBRESSL_VERSION_NUMBER)
-       ssl_methods[TLS_USE_TLSv1_1_PLUS - 1] = (void*)TLS_OP_TLSv1_1_PLUS;
- #endif
- 
--#if OPENSSL_VERSION_NUMBER >= 0x1000105fL
-+#if OPENSSL_VERSION_NUMBER >= 0x1000105fL && !defined(LIBRESSL_VERSION_NUMBER)
-       ssl_methods[TLS_USE_TLSv1_2_PLUS - 1] = (void*)TLS_OP_TLSv1_2_PLUS;
- #endif
- 
-@@ -477,6 +478,7 @@ static void init_ssl_methods(void)
-  */
- static int init_tls_compression(void)
- {
-+#ifndef LIBRESSL_VERSION_NUMBER
- #if OPENSSL_VERSION_NUMBER < 0x010100000L
- #if OPENSSL_VERSION_NUMBER >= 0x00908000L
-       int n, r;
-@@ -563,6 +565,7 @@ static int init_tls_compression(void)
- end:
- #endif /* OPENSSL_VERSION_NUMBER >= 0.9.8 */
- #endif /* OPENSSL_VERSION_NUMBER < 1.1.0 */
-+#endif /* LIBRESSL_VERSION_NUMBER */
-       return 0;
- }
- 
-@@ -573,6 +576,7 @@ end:
-  */
- int tls_pre_init(void)
- {
-+#ifndef LIBRESSL_VERSION_NUMBER
- #if OPENSSL_VERSION_NUMBER < 0x010100000L
-       void *(*mf)(size_t) = NULL;
-       void *(*rf)(void *, size_t) = NULL;
-@@ -599,6 +603,7 @@ int tls_pre_init(void)
-                               " (can be loaded first to be safe)\n");
-               return -1;
-       }
-+#endif /* LIBRESSL_VERSION_NUMBER */
- 
-       if (tls_init_locks()<0)
-               return -1;
-@@ -632,7 +637,7 @@ int init_tls_h(void)
- {
-       /*struct socket_info* si;*/
-       long ssl_version;
--#if OPENSSL_VERSION_NUMBER < 0x010100000L
-+#if OPENSSL_VERSION_NUMBER < 0x010100000L && !defined(LIBRESSL_VERSION_NUMBER)
-       int lib_kerberos;
-       int lib_zlib;
-       int kerberos_support;
-@@ -676,7 +681,7 @@ int init_tls_h(void)
-       }
- 
- /* check kerberos support using compile flags only for version < 1.1.0 */
--#if OPENSSL_VERSION_NUMBER < 0x010100000L
-+#if OPENSSL_VERSION_NUMBER < 0x010100000L && !defined(LIBRESSL_VERSION_NUMBER)
- 
- #ifdef TLS_KERBEROS_SUPPORT
-       kerberos_support=1;
-@@ -847,7 +852,7 @@ void destroy_tls_h(void)
-       tls_destroy_cfg();
-       tls_destroy_locks();
-       tls_ct_wq_destroy();
--#if OPENSSL_VERSION_NUMBER >= 0x010100000L
-+#if OPENSSL_VERSION_NUMBER >= 0x010100000L && 
!defined(LIBRESSL_VERSION_NUMBER)
-       /* explicit execution of libssl cleanup to avoid being executed again
-        * by atexit(), when shm is gone */
-       DBG("executing openssl v1.1+ cleanup\n");
Index: patches/patch-src_modules_tls_tls_locking_c
===================================================================
RCS file: patches/patch-src_modules_tls_tls_locking_c
diff -N patches/patch-src_modules_tls_tls_locking_c
--- patches/patch-src_modules_tls_tls_locking_c 21 Sep 2017 09:34:32 -0000      
1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,23 +0,0 @@
-$OpenBSD: patch-src_modules_tls_tls_locking_c,v 1.1 2017/09/21 09:34:32 sthen 
Exp $
-
-Index: src/modules/tls/tls_locking.c
---- src/modules/tls/tls_locking.c.orig
-+++ src/modules/tls/tls_locking.c
-@@ -33,7 +33,7 @@ static int n_static_locks=0;
- static gen_lock_set_t* static_locks=0;
- 
- /* OpenSSL is thread-safe since 1.1.0 */
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
- 
- /* "dynamic" locks */
- 
-@@ -168,7 +168,7 @@ int tls_init_locks()
-       }
- 
- /* OpenSSL is thread-safe since 1.1.0 */
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
-       /* set "dynamic" locks callbacks */
-       CRYPTO_set_dynlock_create_callback(dyn_create_f);
-       CRYPTO_set_dynlock_lock_callback(dyn_lock_f);
Index: patches/patch-src_modules_tls_tls_rand_c
===================================================================
RCS file: patches/patch-src_modules_tls_tls_rand_c
diff -N patches/patch-src_modules_tls_tls_rand_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_modules_tls_tls_rand_c    4 Feb 2021 19:29:37 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: src/modules/tls/tls_rand.c
+--- src/modules/tls/tls_rand.c.orig
++++ src/modules/tls/tls_rand.c
+@@ -29,7 +29,7 @@
+ 
+ #include "tls_rand.h"
+ 
+-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
+ 
+ #include "../../core/dprint.h"
+ #include "../../core/locking.h"
Index: patches/patch-src_modules_tls_tls_select_c
===================================================================
RCS file: patches/patch-src_modules_tls_tls_select_c
diff -N patches/patch-src_modules_tls_tls_select_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_modules_tls_tls_select_c  4 Feb 2021 19:29:37 -0000
@@ -0,0 +1,23 @@
+$OpenBSD$
+
+Index: src/modules/tls/tls_select.c
+--- src/modules/tls/tls_select.c.orig
++++ src/modules/tls/tls_select.c
+@@ -822,7 +822,7 @@ static int pv_ssl_cert(sip_msg_t* msg, pv_param_t* par
+ }
+ 
+ 
+-#if (OPENSSL_VERSION_NUMBER >= 0x10100001L)
++#if (OPENSSL_VERSION_NUMBER >= 0x10100001L) && 
!defined(LIBRESSL_VERSION_NUMBER)
+ /* NB: SSL_get0_verified_chain() was introduced in OpenSSL 1.1.0 */
+ static int get_verified_cert_chain(STACK_OF(X509)** chain, struct 
tcp_connection** c, struct sip_msg* msg)
+ {
+@@ -1294,7 +1294,7 @@ select_row_t tls_sel[] = {
+       { sel_cert, SEL_PARAM_STR, STR_STATIC_INIT("URLEncodedCert"), 
sel_ssl_cert, DIVERSION | CERT_URLENCODED},
+       { sel_cert, SEL_PARAM_STR, STR_STATIC_INIT("urlencoded_cert"), 
sel_ssl_cert, DIVERSION | CERT_URLENCODED},
+ 
+-#if (OPENSSL_VERSION_NUMBER >= 0x10100001L)
++#if (OPENSSL_VERSION_NUMBER >= 0x10100001L) && 
!defined(LIBRESSL_VERSION_NUMBER)
+       { sel_cert, SEL_PARAM_STR, STR_STATIC_INIT("verified_cert_chain"), 
sel_ssl_verified_cert_chain, CONSUME_NEXT_INT},
+ #endif
+ 
Index: patches/patch-src_modules_tls_utils_openssl_mutex_shared_Makefile
===================================================================
RCS file: patches/patch-src_modules_tls_utils_openssl_mutex_shared_Makefile
diff -N patches/patch-src_modules_tls_utils_openssl_mutex_shared_Makefile
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_modules_tls_utils_openssl_mutex_shared_Makefile   4 Feb 
2021 19:29:37 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: src/modules/tls/utils/openssl_mutex_shared/Makefile
+--- src/modules/tls/utils/openssl_mutex_shared/Makefile.orig
++++ src/modules/tls/utils/openssl_mutex_shared/Makefile
+@@ -19,7 +19,7 @@ install-modules: openssl_mutex_shared.so
+       $(INSTALL_BIN) openssl_mutex_shared.so 
$(modules_prefix)/$(lib_dir)/openssl_mutex_shared
+ 
+ openssl_mutex_shared.so: openssl_mutex_shared.c
+-      $(CC) -g -D_GNU_SOURCE -std=c99 -fvisibility=hidden -pthread -o $@ -O3 
-Wall -shared -fPIC -ldl $<
++      $(CC) -g -D_GNU_SOURCE -std=c99 -fvisibility=hidden -pthread -o $@ -O3 
-Wall -shared -fPIC ${LIBDL} $<
+ 
+ .PHONY: clean
+ clean:
Index: patches/patch-src_modules_xhttp_pi_xhttp_pi_fnc_c
===================================================================
RCS file: 
/cvs/ports/telephony/kamailio/patches/patch-src_modules_xhttp_pi_xhttp_pi_fnc_c,v
retrieving revision 1.2
diff -u -p -r1.2 patch-src_modules_xhttp_pi_xhttp_pi_fnc_c
--- patches/patch-src_modules_xhttp_pi_xhttp_pi_fnc_c   21 Sep 2017 09:34:32 
-0000      1.2
+++ patches/patch-src_modules_xhttp_pi_xhttp_pi_fnc_c   4 Feb 2021 19:29:37 
-0000
@@ -3,7 +3,7 @@ $OpenBSD: patch-src_modules_xhttp_pi_xht
 Index: src/modules/xhttp_pi/xhttp_pi_fnc.c
 --- src/modules/xhttp_pi/xhttp_pi_fnc.c.orig
 +++ src/modules/xhttp_pi/xhttp_pi_fnc.c
-@@ -3193,7 +3193,7 @@ int ph_run_pi_cmd(pi_ctx_t* ctx)
+@@ -3186,7 +3186,7 @@ int ph_run_pi_cmd(pi_ctx_t* ctx)
                                                val_str.len = max_page_len - 
ctx->reply.body.len;
                                                
if(db_time2str(values[j].val.time_val,
                                                                        
val_str.s, &val_str.len)!=0){
@@ -12,7 +12,7 @@ Index: src/modules/xhttp_pi/xhttp_pi_fnc
                                                                
values[j].val.time_val);
                                                        goto error;
                                                }
-@@ -3201,7 +3201,7 @@ int ph_run_pi_cmd(pi_ctx_t* ctx)
+@@ -3194,7 +3194,7 @@ int ph_run_pi_cmd(pi_ctx_t* ctx)
                                                ctx->reply.body.len += 
val_str.len;
                                                if(link_on) 
XHTTP_PI_COPY_2(p,XHTTP_PI_SQUOT_GT,val_str);
                                                LM_DBG("   got %.*s[%d]=>"
Index: patches/patch-src_modules_xmlrpc_xmlrpc_c
===================================================================
RCS file: patches/patch-src_modules_xmlrpc_xmlrpc_c
diff -N patches/patch-src_modules_xmlrpc_xmlrpc_c
--- patches/patch-src_modules_xmlrpc_xmlrpc_c   3 Jul 2017 22:14:20 -0000       
1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-src_modules_xmlrpc_xmlrpc_c,v 1.1 2017/07/03 22:14:20 sthen 
Exp $
-
-Index: src/modules/xmlrpc/xmlrpc.c
---- src/modules/xmlrpc/xmlrpc.c.orig
-+++ src/modules/xmlrpc/xmlrpc.c
-@@ -19,7 +19,7 @@
-  * Temple Place, Suite 330, Boston, MA 02111-1307 USA
-  */
- /*This define breaks on Solaris OS */
--#ifndef __OS_solaris
-+#if !defined (__OS_solaris) && !defined (__OpenBSD__)
-       #define _XOPEN_SOURCE 4           /* strptime */
- #endif
- #define _XOPEN_SOURCE_EXTENDED 1  /* solaris */
Index: patches/patch-utils_kamcmd_kamcmd_c
===================================================================
RCS file: patches/patch-utils_kamcmd_kamcmd_c
diff -N patches/patch-utils_kamcmd_kamcmd_c
--- patches/patch-utils_kamcmd_kamcmd_c 4 Jul 2017 08:29:27 -0000       1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,41 +0,0 @@
-$OpenBSD: patch-utils_kamcmd_kamcmd_c,v 1.1 2017/07/04 08:29:27 sthen Exp $
-
-Index: utils/kamcmd/kamcmd.c
---- utils/kamcmd/kamcmd.c.orig
-+++ utils/kamcmd/kamcmd.c
-@@ -211,7 +211,11 @@ static char* trim_ws(char* l)
- 
- int gen_cookie()
- {
-+#ifdef HAVE_ARC4RANDOM
-+      return arc4random();
-+#else
-       return rand();
-+#endif
- }
- 
- 
-@@ -472,8 +476,13 @@ int connect_unix_sock(char* name, int type)
-                       if (sock_dir==0)
-                               sock_dir="/tmp";
- retry:
-+#ifdef HAVE_ARC4RANDOM
-                       ret=snprintf(mysun.sun_path, UNIX_PATH_MAX, "%s/" NAME 
"_%d",
-+                                                      sock_dir, arc4random());
-+#else
-+                      ret=snprintf(mysun.sun_path, UNIX_PATH_MAX, "%s/" NAME 
"_%d",
-                                                       sock_dir, rand());
-+#endif
-                       if ((ret<0) ||(ret>=UNIX_PATH_MAX)){
-                               fprintf(stderr, "ERROR: buffer overflow while 
trying to"
-                                                       "generate unix datagram 
socket name");
-@@ -2062,7 +2071,9 @@ int main(int argc, char** argv)
-       }
- 
-       /* init the random number generator */
-+#ifndef HAVE_ARC4RANDOM
-       srand(getpid()+time(0)); /* we don't need very strong random numbers */
-+#endif
- 
-       if (sock_name==0){
-               fprintf(stderr, "ERROR: no server socket address specified\n");
Index: patches/patch-utils_kamctl_kamctl
===================================================================
RCS file: patches/patch-utils_kamctl_kamctl
diff -N patches/patch-utils_kamctl_kamctl
--- patches/patch-utils_kamctl_kamctl   20 Feb 2018 08:30:06 -0000      1.7
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-utils_kamctl_kamctl,v 1.7 2018/02/20 08:30:06 sthen Exp $
---- utils/kamctl/kamctl.orig   Wed Apr  5 16:32:39 2017
-+++ utils/kamctl/kamctl        Mon May 15 21:48:56 2017
-@@ -75,7 +75,7 @@ fi
- if [ -f "$MYLIBDIR/kamctl.base" ]; then
-       . "$MYLIBDIR/kamctl.base"
- else
--      echo -e "Cannot load core functions '$MYLIBDIR/kamctl.base' - exiting 
...\n"
-+      printf "Cannot load core functions '$MYLIBDIR/kamctl.base' - exiting 
...\n"
-       exit -1
- fi
- 
Index: patches/patch-utils_kamctl_kamctl_base
===================================================================
RCS file: /cvs/ports/telephony/kamailio/patches/patch-utils_kamctl_kamctl_base,v
retrieving revision 1.5
diff -u -p -r1.5 patch-utils_kamctl_kamctl_base
--- patches/patch-utils_kamctl_kamctl_base      3 Jul 2017 22:14:20 -0000       
1.5
+++ patches/patch-utils_kamctl_kamctl_base      4 Feb 2021 19:29:37 -0000
@@ -1,48 +1,32 @@
 $OpenBSD: patch-utils_kamctl_kamctl_base,v 1.5 2017/07/03 22:14:20 sthen Exp $
---- utils/kamctl/kamctl.base.orig      Wed Apr  5 16:32:39 2017
-+++ utils/kamctl/kamctl.base   Mon May 15 21:48:56 2017
-@@ -556,7 +556,7 @@ USAGE_FUNCTIONS="$USAGE_FUNCTIONS usage_ksr_srv"
- mdbg() {
-       if [ "0$VERBOSE" -ne 0 ] ; then
-               if [ -t 1 -a -z "$NOHLPRINT" ] ; then
--                      echo -e "\033[1m$1\033[0m"
-+                      printf "\033[1m$1\033[0m\n"
-               else
-                       echo "$1"
-               fi
-@@ -565,7 +565,7 @@ mdbg() {
+
+Index: utils/kamctl/kamctl.base
+--- utils/kamctl/kamctl.base.orig
++++ utils/kamctl/kamctl.base
+@@ -603,7 +603,7 @@ mdbg() {
  
  mwarn() {
        if [ -t 1 -a -z "$NOHLPRINT" ] ; then
 -              echo -e '\E[37;32m'"\033[1mWARNING: $1\033[0m"
-+              printf '\e[37;32m'"\033[1mWARNING: $1\033[0m\n"
++              echo -e '\033[37;32m'"\033[1mWARNING: $1\033[0m"
        else
                echo "** WARNING: $1"
        fi
-@@ -573,7 +573,7 @@ mwarn() {
+@@ -611,7 +611,7 @@ mwarn() {
  
  minfo() {
        if [ -t 1 -a -z "$NOHLPRINT" ] ; then
 -              echo -e '\E[37;33m'"\033[1mINFO: $1\033[0m"
-+              printf '\e[37;33m'"\033[1mINFO: $1\033[0m\n"
++              echo -e '\033[37;33m'"\033[1mINFO: $1\033[0m"
        else
                echo "** INFO: $1"
        fi
-@@ -581,7 +581,7 @@ minfo() {
- 
- mecho() {
-       if [ -t 1 -a -z "$NOHLPRINT" ] ; then
--              echo -e "\033[1m$1\033[0m"
-+              printf "\033[1m$1\033[0m\n"
-       else
-               echo "$1"
-       fi
-@@ -589,7 +589,7 @@ mecho() {
+@@ -627,7 +627,7 @@ mecho() {
  
  merr() {
        if [ -t 1 -a -z "$NOHLPRINT" ] ; then
 -              echo -e '\E[37;31m'"\033[1mERROR: $1\033[0m"
-+              printf '\e[37;31m'"\033[1mERROR: $1\033[0m\n"
++              echo -e '\033[37;31m'"\033[1mERROR: $1\033[0m"
        else
                echo "** ERROR: $1"
        fi
Index: patches/patch-utils_kamctl_kamctl_rpcfifo
===================================================================
RCS file: patches/patch-utils_kamctl_kamctl_rpcfifo
diff -N patches/patch-utils_kamctl_kamctl_rpcfifo
--- patches/patch-utils_kamctl_kamctl_rpcfifo   20 Mar 2018 22:03:35 -0000      
1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-$OpenBSD: patch-utils_kamctl_kamctl_rpcfifo,v 1.1 2018/03/20 22:03:35 sthen 
Exp $
-
-Index: utils/kamctl/kamctl.rpcfifo
---- utils/kamctl/kamctl.rpcfifo.orig
-+++ utils/kamctl/kamctl.rpcfifo
-@@ -105,8 +105,8 @@ rpc_cmd()
-               rpcparamval "${1}"
-               CMD="${CMD}, \"params\": [${RPCVAL}"
-               RPCPARAMS="yes"
-+              shift
-       fi
--      shift
-       while [ -n "$1" ] ; do
-               rpcparamval "${1}"
-               CMD="${CMD}, ${RPCVAL}"
Index: patches/patch-utils_kamctl_kamctlrc
===================================================================
RCS file: /cvs/ports/telephony/kamailio/patches/patch-utils_kamctl_kamctlrc,v
retrieving revision 1.5
diff -u -p -r1.5 patch-utils_kamctl_kamctlrc
--- patches/patch-utils_kamctl_kamctlrc 20 Mar 2018 22:03:35 -0000      1.5
+++ patches/patch-utils_kamctl_kamctlrc 4 Feb 2021 19:29:37 -0000
@@ -1,26 +1,23 @@
 $OpenBSD: patch-utils_kamctl_kamctlrc,v 1.5 2018/03/20 22:03:35 sthen Exp $
+
 Index: utils/kamctl/kamctlrc
 --- utils/kamctl/kamctlrc.orig
 +++ utils/kamctl/kamctlrc
-@@ -69,7 +69,7 @@
+@@ -72,7 +72,7 @@
  
  
- # Program to calculate a message-digest fingerprint
+ ## Program to calculate a message-digest fingerprint
 -# MD5="md5sum"
 +MD5="md5"
  
- # awk tool
+ ## awk tool
  # AWK="awk"
-@@ -151,8 +151,11 @@
+@@ -157,7 +157,7 @@
  
  ## Kamailio START Options
- ## PID file path - default is: /var/run/kamailio.pid
--# PID_FILE=/var/run/kamailio/kamailio.pid
+ ## PID file path - default is: /run/kamailio/kamailio.pid
+-# PID_FILE=/run/kamailio/kamailio.pid
 +PID_FILE=/var/run/kamailio/kamailio.pid
  
  ## Extra start options - default is: not set
- # example: start Kamailio with 64MB share memory: STARTOPTIONS="-m 64"
- # STARTOPTIONS=
-+
-+# Disable colour highlighting at the terminal
-+NOHLPRINT=1
+ ## example: start Kamailio with 64MB share memory: STARTOPTIONS="-m 64"
Index: patches/patch-utils_kamctl_kamdbctl
===================================================================
RCS file: patches/patch-utils_kamctl_kamdbctl
diff -N patches/patch-utils_kamctl_kamdbctl
--- patches/patch-utils_kamctl_kamdbctl 20 Feb 2018 08:30:06 -0000      1.4
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-utils_kamctl_kamdbctl,v 1.4 2018/02/20 08:30:06 sthen Exp $
---- utils/kamctl/kamdbctl.orig Fri Oct  2 15:35:18 2015
-+++ utils/kamctl/kamdbctl      Mon Oct 19 14:00:40 2015
-@@ -70,7 +70,7 @@ fi
- if [ -f "$MYLIBDIR/kamdbctl.base" ]; then
-       . "$MYLIBDIR/kamdbctl.base"
- else
--      echo -e "Cannot load core functions '$MYLIBDIR/kamdbctl.base' - exiting 
...\n"
-+      printf "Cannot load core functions '$MYLIBDIR/kamdbctl.base' - exiting 
...\n"
-       exit -1
- fi
- 
Index: patches/patch-utils_kamctl_kamdbctl_base
===================================================================
RCS file: 
/cvs/ports/telephony/kamailio/patches/patch-utils_kamctl_kamdbctl_base,v
retrieving revision 1.4
diff -u -p -r1.4 patch-utils_kamctl_kamdbctl_base
--- patches/patch-utils_kamctl_kamdbctl_base    3 Jul 2017 22:14:20 -0000       
1.4
+++ patches/patch-utils_kamctl_kamdbctl_base    4 Feb 2021 19:29:37 -0000
@@ -1,61 +1,32 @@
 $OpenBSD: patch-utils_kamctl_kamdbctl_base,v 1.4 2017/07/03 22:14:20 sthen Exp 
$
+
 Index: utils/kamctl/kamdbctl.base
 --- utils/kamctl/kamdbctl.base.orig
 +++ utils/kamctl/kamdbctl.base
-@@ -155,7 +155,7 @@ credentials()
- mdbg() {
-       if [ "0$VERBOSE" -ne 0 ] ; then
-               if [ -t 1 -a -z "$NOHLPRINT" ] ; then
--                      echo -e "\033[1m$1\033[0m"
-+                      printf "\033[1m$1\033[0m\n"
-               else
-                       echo "$1"
-               fi
-@@ -164,7 +164,7 @@ mdbg() {
+@@ -163,7 +163,7 @@ mdbg() {
  
  mwarn() {
        if [ -t 1 -a -z "$NOHLPRINT" ] ; then
 -              echo -e '\E[37;32m'"\033[1mWARNING: $1\033[0m"
-+              printf '\e[37;32m'"\033[1mWARNING: $1\033[0m\n"
++              echo -e '\033[37;32m'"\033[1mWARNING: $1\033[0m"
        else
                echo "** WARNING: $1"
        fi
-@@ -172,7 +172,7 @@ mwarn() {
+@@ -171,7 +171,7 @@ mwarn() {
  
  minfo() {
        if [ -t 1 -a -z "$NOHLPRINT" ] ; then
 -              echo -e '\E[37;33m'"\033[1mINFO: $1\033[0m"
-+              printf '\e[37;33m'"\033[1mINFO: $1\033[0m\n"
++              echo -e '\033[37;33m'"\033[1mINFO: $1\033[0m"
        else
                echo "** INFO: $1"
        fi
-@@ -180,7 +180,7 @@ minfo() {
- 
- mecho() {
-       if [ -t 1 -a -z "$NOHLPRINT" ] ; then
--              echo -e "\033[1m$1\033[0m"
-+              printf "\033[1m$1\033[0m\n"
-       else
-               echo "$1"
-       fi
-@@ -188,7 +188,7 @@ mecho() {
+@@ -187,7 +187,7 @@ mecho() {
  
  merr() {
        if [ -t 1 -a -z "$NOHLPRINT" ] ; then
 -              echo -e '\E[37;31m'"\033[1mERROR: $1\033[0m"
-+              printf '\e[37;31m'"\033[1mERROR: $1\033[0m\n"
++              echo -e '\033[37;31m'"\033[1mERROR: $1\033[0m"
        else
                echo "** ERROR: $1"
        fi
-@@ -214,8 +214,8 @@ get_answer ()
-     else
-         ANSWER=${value}
-     fi
--    ANSWER=${ANSWER:0:1}
--    ANSWER=${ANSWER/Y/y}
--    ANSWER=${ANSWER/N/n}
-+    ANSWER=`echo ${ANSWER} | cut -c1`
-+    ANSWER=`echo ${ANSWER} | sed 's/Y/y/'`
-+    ANSWER=`echo ${ANSWER} | sed 's/N/n/'`
- }
- 
Index: pkg/PLIST-berkeley
===================================================================
RCS file: /cvs/ports/telephony/kamailio/pkg/PLIST-berkeley,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST-berkeley
--- pkg/PLIST-berkeley  4 Feb 2021 18:43:58 -0000       1.2
+++ pkg/PLIST-berkeley  4 Feb 2021 19:29:37 -0000
@@ -55,6 +55,7 @@ share/kamailio/db_berkeley/kamailio/rls_
 share/kamailio/db_berkeley/kamailio/rtpengine
 share/kamailio/db_berkeley/kamailio/rtpproxy
 share/kamailio/db_berkeley/kamailio/sca_subscriptions
+share/kamailio/db_berkeley/kamailio/secfilter
 share/kamailio/db_berkeley/kamailio/silo
 share/kamailio/db_berkeley/kamailio/sip_trace
 share/kamailio/db_berkeley/kamailio/speed_dial
Index: pkg/PLIST-main
===================================================================
RCS file: /cvs/ports/telephony/kamailio/pkg/PLIST-main,v
retrieving revision 1.7
diff -u -p -r1.7 PLIST-main
--- pkg/PLIST-main      4 Feb 2021 18:43:58 -0000       1.7
+++ pkg/PLIST-main      4 Feb 2021 19:29:37 -0000
@@ -16,12 +16,13 @@ lib/kamailio/kamctl/kamdbctl.base
 lib/kamailio/kamctl/kamdbctl.dbtext
 @lib lib/kamailio/libsrdb1.so.${LIBsrdb1_VERSION}
 @lib lib/kamailio/libsrdb2.so.${LIBsrdb2_VERSION}
-@lib lib/kamailio/libsrutils.so.${LIBsrutils_VERSION}
 @lib lib/kamailio/libtrie.so.${LIBtrie_VERSION}
 lib/kamailio/modules/
 @so lib/kamailio/modules/acc.so
+@so lib/kamailio/modules/acc_diameter.so
 @so lib/kamailio/modules/alias_db.so
 @so lib/kamailio/modules/app_jsdt.so
+@so lib/kamailio/modules/app_sqlang.so
 @so lib/kamailio/modules/async.so
 @so lib/kamailio/modules/auth.so
 @so lib/kamailio/modules/auth_db.so
@@ -33,6 +34,7 @@ lib/kamailio/modules/
 @so lib/kamailio/modules/benchmark.so
 @so lib/kamailio/modules/blst.so
 @so lib/kamailio/modules/call_control.so
+@so lib/kamailio/modules/call_obj.so
 @so lib/kamailio/modules/cfg_db.so
 @so lib/kamailio/modules/cfg_rpc.so
 @so lib/kamailio/modules/cfgt.so
@@ -57,6 +59,7 @@ lib/kamailio/modules/
 @so lib/kamailio/modules/domainpolicy.so
 @so lib/kamailio/modules/drouting.so
 @so lib/kamailio/modules/enum.so
+@so lib/kamailio/modules/evrexec.so
 @so lib/kamailio/modules/exec.so
 @so lib/kamailio/modules/group.so
 @so lib/kamailio/modules/htable.so
@@ -65,9 +68,12 @@ lib/kamailio/modules/
 @so lib/kamailio/modules/imc.so
 @so lib/kamailio/modules/ipops.so
 @so lib/kamailio/modules/jsonrpcs.so
+@so lib/kamailio/modules/keepalive.so
+@so lib/kamailio/modules/kemix.so
 @so lib/kamailio/modules/kex.so
 @so lib/kamailio/modules/lcr.so
 @so lib/kamailio/modules/log_custom.so
+@so lib/kamailio/modules/lost.so
 @so lib/kamailio/modules/mangler.so
 @so lib/kamailio/modules/matrix.so
 @so lib/kamailio/modules/maxfwd.so
@@ -90,6 +96,7 @@ lib/kamailio/modules/
 @so lib/kamailio/modules/pipelimit.so
 @so lib/kamailio/modules/prefix_route.so
 @so lib/kamailio/modules/pv.so
+@so lib/kamailio/modules/pv_headers.so
 @so lib/kamailio/modules/qos.so
 @so lib/kamailio/modules/ratelimit.so
 @so lib/kamailio/modules/regex.so
@@ -103,7 +110,10 @@ lib/kamailio/modules/
 @so lib/kamailio/modules/sca.so
 @so lib/kamailio/modules/sdpops.so
 @so lib/kamailio/modules/seas.so
+@so lib/kamailio/modules/secfilter.so
 @so lib/kamailio/modules/sipcapture.so
+@so lib/kamailio/modules/sipdump.so
+@so lib/kamailio/modules/sipjson.so
 @so lib/kamailio/modules/sipt.so
 @so lib/kamailio/modules/siptrace.so
 @so lib/kamailio/modules/siputils.so
@@ -142,10 +152,13 @@ lib/kamailio/modules/
 @so lib/kamailio/modules/utils.so
 @so lib/kamailio/modules/websocket.so
 @so lib/kamailio/modules/xhttp.so
+@so lib/kamailio/modules/xhttp_prom.so
 @so lib/kamailio/modules/xhttp_rpc.so
 @so lib/kamailio/modules/xlog.so
 @so lib/kamailio/modules/xmpp.so
 @so lib/kamailio/modules/xprint.so
+lib/kamailio/openssl_mutex_shared/
+@so lib/kamailio/openssl_mutex_shared/openssl_mutex_shared.so
 @man man/man5/kamailio.cfg.5
 @man man/man8/kamailio.8
 @man man/man8/kamcmd.8
@@ -160,8 +173,10 @@ share/doc/kamailio/INSTALL
 share/doc/kamailio/README
 share/doc/kamailio/modules/
 share/doc/kamailio/modules/README.acc
+share/doc/kamailio/modules/README.acc_diameter
 share/doc/kamailio/modules/README.alias_db
 share/doc/kamailio/modules/README.app_jsdt
+share/doc/kamailio/modules/README.app_sqlang
 share/doc/kamailio/modules/README.async
 share/doc/kamailio/modules/README.auth
 share/doc/kamailio/modules/README.auth_db
@@ -173,6 +188,7 @@ share/doc/kamailio/modules/README.avpops
 share/doc/kamailio/modules/README.benchmark
 share/doc/kamailio/modules/README.blst
 share/doc/kamailio/modules/README.call_control
+share/doc/kamailio/modules/README.call_obj
 share/doc/kamailio/modules/README.cfg_db
 share/doc/kamailio/modules/README.cfg_rpc
 share/doc/kamailio/modules/README.cfgt
@@ -197,6 +213,7 @@ share/doc/kamailio/modules/README.domain
 share/doc/kamailio/modules/README.domainpolicy
 share/doc/kamailio/modules/README.drouting
 share/doc/kamailio/modules/README.enum
+share/doc/kamailio/modules/README.evrexec
 share/doc/kamailio/modules/README.exec
 share/doc/kamailio/modules/README.group
 share/doc/kamailio/modules/README.htable
@@ -205,9 +222,12 @@ share/doc/kamailio/modules/README.http_c
 share/doc/kamailio/modules/README.imc
 share/doc/kamailio/modules/README.ipops
 share/doc/kamailio/modules/README.jsonrpcs
+share/doc/kamailio/modules/README.keepalive
+share/doc/kamailio/modules/README.kemix
 share/doc/kamailio/modules/README.kex
 share/doc/kamailio/modules/README.lcr
 share/doc/kamailio/modules/README.log_custom
+share/doc/kamailio/modules/README.lost
 share/doc/kamailio/modules/README.mangler
 share/doc/kamailio/modules/README.matrix
 share/doc/kamailio/modules/README.maxfwd
@@ -230,6 +250,7 @@ share/doc/kamailio/modules/README.pike
 share/doc/kamailio/modules/README.pipelimit
 share/doc/kamailio/modules/README.prefix_route
 share/doc/kamailio/modules/README.pv
+share/doc/kamailio/modules/README.pv_headers
 share/doc/kamailio/modules/README.qos
 share/doc/kamailio/modules/README.ratelimit
 share/doc/kamailio/modules/README.regex
@@ -243,7 +264,10 @@ share/doc/kamailio/modules/README.sanity
 share/doc/kamailio/modules/README.sca
 share/doc/kamailio/modules/README.sdpops
 share/doc/kamailio/modules/README.seas
+share/doc/kamailio/modules/README.secfilter
 share/doc/kamailio/modules/README.sipcapture
+share/doc/kamailio/modules/README.sipdump
+share/doc/kamailio/modules/README.sipjson
 share/doc/kamailio/modules/README.sipt
 share/doc/kamailio/modules/README.siptrace
 share/doc/kamailio/modules/README.siputils
@@ -282,6 +306,7 @@ share/doc/kamailio/modules/README.usrloc
 share/doc/kamailio/modules/README.utils
 share/doc/kamailio/modules/README.websocket
 share/doc/kamailio/modules/README.xhttp
+share/doc/kamailio/modules/README.xhttp_prom
 share/doc/kamailio/modules/README.xhttp_rpc
 share/doc/kamailio/modules/README.xlog
 share/doc/kamailio/modules/README.xmpp
@@ -289,8 +314,6 @@ share/doc/kamailio/modules/README.xprint
 share/examples/kamailio/
 @sample ${SYSCONFDIR}/kamailio/
 @comment share/examples/kamailio/dictionary.kamailio
-share/examples/kamailio/kamailio-advanced.cfg
-share/examples/kamailio/kamailio-basic.cfg
 share/examples/kamailio/kamailio.cfg
 @sample ${SYSCONFDIR}/kamailio/kamailio.cfg
 share/examples/kamailio/kamctlrc
@@ -349,6 +372,7 @@ share/kamailio/dbtext/kamailio/rls_watch
 share/kamailio/dbtext/kamailio/rtpengine
 share/kamailio/dbtext/kamailio/rtpproxy
 share/kamailio/dbtext/kamailio/sca_subscriptions
+share/kamailio/dbtext/kamailio/secfilter
 share/kamailio/dbtext/kamailio/silo
 share/kamailio/dbtext/kamailio/sip_trace
 share/kamailio/dbtext/kamailio/speed_dial
Index: pkg/PLIST-mysql
===================================================================
RCS file: /cvs/ports/telephony/kamailio/pkg/PLIST-mysql,v
retrieving revision 1.6
diff -u -p -r1.6 PLIST-mysql
--- pkg/PLIST-mysql     4 Feb 2021 18:43:58 -0000       1.6
+++ pkg/PLIST-mysql     4 Feb 2021 19:29:37 -0000
@@ -19,7 +19,7 @@ share/kamailio/mysql/drouting-create.sql
 share/kamailio/mysql/group-create.sql
 share/kamailio/mysql/htable-create.sql
 share/kamailio/mysql/imc-create.sql
-share/kamailio/mysql/ims_charging_create.sql
+share/kamailio/mysql/ims_charging-create.sql
 share/kamailio/mysql/ims_dialog-create.sql
 share/kamailio/mysql/ims_usrloc_pcscf-create.sql
 share/kamailio/mysql/ims_usrloc_scscf-create.sql
@@ -38,6 +38,7 @@ share/kamailio/mysql/rls-create.sql
 share/kamailio/mysql/rtpengine-create.sql
 share/kamailio/mysql/rtpproxy-create.sql
 share/kamailio/mysql/sca-create.sql
+share/kamailio/mysql/secfilter-create.sql
 share/kamailio/mysql/siptrace-create.sql
 share/kamailio/mysql/speeddial-create.sql
 share/kamailio/mysql/standard-create.sql
Index: pkg/PLIST-postgresql
===================================================================
RCS file: /cvs/ports/telephony/kamailio/pkg/PLIST-postgresql,v
retrieving revision 1.6
diff -u -p -r1.6 PLIST-postgresql
--- pkg/PLIST-postgresql        4 Feb 2021 18:43:58 -0000       1.6
+++ pkg/PLIST-postgresql        4 Feb 2021 19:29:37 -0000
@@ -34,6 +34,7 @@ share/kamailio/postgres/rls-create.sql
 share/kamailio/postgres/rtpengine-create.sql
 share/kamailio/postgres/rtpproxy-create.sql
 share/kamailio/postgres/sca-create.sql
+share/kamailio/postgres/secfilter-create.sql
 share/kamailio/postgres/siptrace-create.sql
 share/kamailio/postgres/speeddial-create.sql
 share/kamailio/postgres/standard-create.sql
Index: pkg/PLIST-xml
===================================================================
RCS file: /cvs/ports/telephony/kamailio/pkg/PLIST-xml,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST-xml
--- pkg/PLIST-xml       4 Feb 2021 18:43:58 -0000       1.2
+++ pkg/PLIST-xml       4 Feb 2021 19:29:37 -0000
@@ -73,6 +73,8 @@ share/kamailio/xhttp_pi/rtpproxy-mod
 share/kamailio/xhttp_pi/rtpproxy-table
 share/kamailio/xhttp_pi/sca-mod
 share/kamailio/xhttp_pi/sca-table
+share/kamailio/xhttp_pi/secfilter-mod
+share/kamailio/xhttp_pi/secfilter-table
 share/kamailio/xhttp_pi/siptrace-mod
 share/kamailio/xhttp_pi/siptrace-table
 share/kamailio/xhttp_pi/speeddial-mod

Reply via email to