1
0
mirror of https://github.com/openbsd/ports.git synced 2025-12-06 07:36:10 +00:00

update to asterisk-22.7.0

This commit is contained in:
sthen
2025-11-23 08:32:23 +00:00
parent ebda4a4344
commit bc3932d330
5 changed files with 17 additions and 59 deletions

View File

@@ -1,5 +1,7 @@
VER= 22.6.0
REVISION= 2
VER= 22.7.0
# keep above 7.8-stable
REVISION-main= 0
PJ_V= 2.15.1
SHLIB_V= 0.0

View File

@@ -1,4 +1,4 @@
SHA256 (asterisk-22.6.0.tar.gz) = 5bM7m2/W+yu750i9NPUX2cY0r7vWxTu73TIU7Ipqd0k=
SHA256 (asterisk-22.7.0.tar.gz) = Ww5dJ2rrAUv4oIqU0QVanpe53OM3WEbupw2lIhv57+c=
SHA256 (pjproject-2.15.1.tar.gz) = jzvZnK8AP5btgDi4o2Ax652M2erqHq/34Bwu72vVVwY=
SIZE (asterisk-22.6.0.tar.gz) = 26426677
SIZE (asterisk-22.7.0.tar.gz) = 26465168
SIZE (pjproject-2.15.1.tar.gz) = 10425868

View File

@@ -1,12 +1,14 @@
Index: contrib/scripts/safe_asterisk
--- contrib/scripts/safe_asterisk.orig
+++ contrib/scripts/safe_asterisk
@@ -7,20 +7,21 @@ ASTVARLOGDIR="__ASTERISK_LOG_DIR__"
@@ -6,21 +6,22 @@ ASTVARRUNDIR="__ASTERISK_VARRUN_DIR__"
ASTVARLOGDIR="__ASTERISK_LOG_DIR__"
CLIARGS="$*" # Grab any args passed to safe_asterisk
#TTY=9 # TTY (if you want one) for Asterisk to run on
-TTY=9 # TTY (if you want one) for Asterisk to run on
-CONSOLE=yes # Whether or not you want a console
-#NOTIFY=root@localhost # Who to notify about crashes
+#TTY=9 # TTY (if you want one) for Asterisk to run on
+CONSOLE=no # Whether or not you want a console
+NOTIFY=root # Who to notify about crashes
#EXEC=/path/to/somescript # Run this command if Asterisk crashes
@@ -27,7 +29,7 @@ Index: contrib/scripts/safe_asterisk
# run asterisk with this priority
PRIORITY=0
@@ -50,6 +51,19 @@ message() {
@@ -48,6 +49,19 @@ message() {
fi
}
@@ -47,16 +49,16 @@ Index: contrib/scripts/safe_asterisk
# Check if Asterisk is already running. If it is, then bug out, because
# starting safe_asterisk when Asterisk is running is very bad.
VERSION=`"${ASTSBINDIR}/asterisk" -nrx 'core show version' 2>/dev/null`
@@ -83,7 +97,7 @@ else
@@ -81,7 +95,7 @@ else
fi
fi
SYSCTL_MAXFILES="fs.file-max"
- elif `uname -s | grep Darwin /dev/null 2>&1`; then
+ elif `uname -s | grep -E '(BSD|Darwin)' /dev/null 2>&1`; then
- elif `uname -s | grep Darwin >/dev/null 2>&1`; then
+ elif `uname -s | grep -E '(BSD|Darwin)' >/dev/null 2>&1`; then
SYSCTL_MAXFILES="kern.maxfiles"
fi
@@ -94,8 +108,10 @@ else
@@ -92,8 +106,10 @@ else
fi
fi

View File

@@ -1,48 +0,0 @@
From 4493bf85329e6ad0bf176fed839905e15d26348e Mon Sep 17 00:00:00 2001
From: Christoph Moench-Tegeder <cmt@burggraben.net>
Date: Sun, 19 Oct 2025 19:03:43 +0200
Subject: [PATCH] Fix Endianness detection in utils.h for non-Linux
Commit 43bf8a4ded7a65203b766b91eaf8331a600e9d8d introduced endian
dependend byte-swapping code in include/asterisk/utils.h, where the
endianness was detected using the __BYTE_ORDER macro. This macro
lives in endian.h, which on Linux is included implicitely (by the
network-related headers, I think), but on FreeBSD the headers are
laid out differently and we do not get __BYTE_ORDER the implicit way.
Instead, this makes the usage of endian.h explicit by including it
where we need it, and switches the BYTE_ORDER/*ENDIAN macros to the
POSIX-defined ones (see
https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/endian.h.html
for standard compliance). Additionally, this adds a compile-time check
for the endianness-logic: compilation will fail if neither big nor
little endian can be detected.
Fixes: #1536
Index: include/asterisk/utils.h
--- include/asterisk/utils.h.orig
+++ include/asterisk/utils.h
@@ -28,6 +28,7 @@
#include <time.h> /* we want to override localtime_r */
#include <unistd.h>
#include <string.h>
+#include <endian.h>
#include "asterisk/lock.h"
#include "asterisk/time.h"
@@ -126,10 +127,12 @@ extern unsigned int __unsigned_int_flags_dummy;
* \param flags The 64-bit flags to swap
* \retval The flags with the upper and lower 32 bits swapped if the system is big-endian,
*/
-#if __BYTE_ORDER == __BIG_ENDIAN
+#if defined(BYTE_ORDER) && (BYTE_ORDER == BIG_ENDIAN)
#define SWAP64_32(flags) (((uint64_t)flags << 32) | ((uint64_t)flags >> 32))
-#else
+#elif defined(BYTE_ORDER) && (BYTE_ORDER == LITTLE_ENDIAN)
#define SWAP64_32(flags) (flags)
+#else
+#error "Endianness not known - endian.h broken?"
#endif
extern uint64_t __unsigned_int_flags_dummy64;

View File

@@ -175,6 +175,7 @@ include/asterisk/security_events_defs.h
include/asterisk/select.h
include/asterisk/sem.h
include/asterisk/serializer.h
include/asterisk/serializer_shutdown_group.h
include/asterisk/sha1.h
include/asterisk/silk.h
include/asterisk/sip_api.h
@@ -210,6 +211,7 @@ include/asterisk/stringfields.h
include/asterisk/strings.h
include/asterisk/stun.h
include/asterisk/syslog.h
include/asterisk/taskpool.h
include/asterisk/taskprocessor.h
include/asterisk/tcptls.h
include/asterisk/tdd.h