Import of pkgsrc-2016Q3

This commit is contained in:
2016-10-14 07:49:11 +02:00
committed by Lionel Sambuc
parent 9d819b6d54
commit 1242aa1e36
35952 changed files with 949749 additions and 377083 deletions

View File

@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.101 2015/09/14 09:06:39 jnemeth Exp $
# $NetBSD: Makefile,v 1.103 2016/02/14 07:55:55 ryoon Exp $
#
COMMENT= Communication utilities
@@ -6,6 +6,7 @@ COMMENT= Communication utilities
SUBDIR+= asterisk
SUBDIR+= asterisk-sounds-de-x9media
SUBDIR+= asterisk-sounds-native
SUBDIR+= asterisk13
SUBDIR+= asterisk18
SUBDIR+= binkd
SUBDIR+= birda
@@ -60,6 +61,7 @@ SUBDIR+= p5-Device-SerialPort
SUBDIR+= p5-Device-XBee-API
SUBDIR+= p5-SMS-Send
SUBDIR+= p5-pilot-link
SUBDIR+= picocom
SUBDIR+= pilot-link
SUBDIR+= pilot-link-libs
SUBDIR+= pilotmgr

View File

@@ -1,5 +1,6 @@
$NetBSD: distinfo,v 1.4 2006/12/28 12:01:38 mjl Exp $
$NetBSD: distinfo,v 1.5 2015/11/03 01:34:52 agc Exp $
SHA1 (asterisk-x9rita-soundfiles-ger-v4.zip) = 858cfafae013c5483791d96ddcf83a645123a8d3
RMD160 (asterisk-x9rita-soundfiles-ger-v4.zip) = 6ca331c7ab434cdbd04d023000d141795d4a8c80
SHA512 (asterisk-x9rita-soundfiles-ger-v4.zip) = 0266f0b3830bac28d819942e93018b6a17fb7eb8a722aa6b93c51c044247ab0909f4d8dc54992a163a839bc59e7f939480693987d8b3017fba28a28256636b0c
Size (asterisk-x9rita-soundfiles-ger-v4.zip) = 1661753 bytes

View File

@@ -1,8 +1,10 @@
$NetBSD: distinfo,v 1.1 2007/06/28 18:52:20 mjl Exp $
$NetBSD: distinfo,v 1.2 2015/11/03 01:34:52 agc Exp $
SHA1 (asterisk-native-sounds-20060209-01-alaw.tar.bz2) = 93182bb0bafa680b11bccdb2498b940d719372f4
RMD160 (asterisk-native-sounds-20060209-01-alaw.tar.bz2) = 1bb7b14279260d96bab0b961be7c11fde49a92a1
SHA512 (asterisk-native-sounds-20060209-01-alaw.tar.bz2) = 2a1bf3b26e88e8dd8ab558aa99c62fe6518dead3877227b5dd5407d41e664bc230cfffe2c95b818b84d578483068349efefea63b9d438ce8cbc55152a02b9ca0
Size (asterisk-native-sounds-20060209-01-alaw.tar.bz2) = 4926386 bytes
SHA1 (asterisk-native-sounds-20060209-01-ulaw.tar.bz2) = f3ff12da05feebe3fd1c14d0265aa3309bfad142
RMD160 (asterisk-native-sounds-20060209-01-ulaw.tar.bz2) = c7d69df8495fbf798c7ef7c8aa0f2da0113a10ce
SHA512 (asterisk-native-sounds-20060209-01-ulaw.tar.bz2) = b33bb228c9c867c95391b0baa33cfea9a2916ffd65ba9d384f0e1421cacd94052755e17d04babf0c81c3f58df5095c7642e0fce6f0ad0a5064bb00e769e55a25
Size (asterisk-native-sounds-20060209-01-ulaw.tar.bz2) = 4924126 bytes

View File

@@ -9,6 +9,11 @@ Interactive Voice Response, Call Queuing. It has support for
three-way calling, caller ID services, ADSI, SIP and H.323 (as both
client and gateway).
This is a long term support version. It is scheduled to go to
security fixes only on October 25th, 2016, and EOL on October 25th,
2017. See here for more information about Asterisk versions:
https://wiki.asterisk.org/wiki/display/AST/Asterisk+Versions
NOTE: This version does not work with the zaptel drivers. It
requires the newer DAHDI drivers which are still being ported.
So, there is no hardware support available at this moment.

View File

@@ -1,22 +1,24 @@
# $NetBSD: Makefile,v 1.127 2015/08/18 07:31:03 wiz Exp $
# $NetBSD: Makefile,v 1.141 2016/09/23 19:16:29 jnemeth Exp $
#
# NOTE: when updating this package, there are two places that sound
# tarballs need to be checked
# tarballs need to be checked; look win ${WRKSRC}/sounds/Makefile
# to find out the current sound file versions
DISTNAME= asterisk-11.19.0
DIST_SUBDIR= ${PKGNAME_NOREV}
DISTFILES= ${DEFAULT_DISTFILES}
EXTRACT_ONLY= ${DISTNAME}.tar.gz
PKGREVISION= 1
DISTNAME= asterisk-11.23.1
CATEGORIES= comms net audio
MASTER_SITES= http://downloads.asterisk.org/pub/telephony/asterisk/ \
http://downloads.asterisk.org/pub/telephony/asterisk/old-releases/ \
http://downloads.asterisk.org/pub/telephony/sounds/releases/
DIST_SUBDIR= ${PKGNAME_NOREV}
DISTFILES= ${DEFAULT_DISTFILES}
COMMENT= The Asterisk Software PBX
OWNER= jnemeth@NetBSD.org
HOMEPAGE= http://www.asterisk.org/
COMMENT= The Asterisk Software PBX
LICENSE= gnu-gpl-v2
EXTRACT_ONLY= ${DISTNAME}.tar.gz
MAKE_JOBS_SAFE= NO
# known to have issues on i386, block the package until the bug is fixed
@@ -38,8 +40,15 @@ CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
CONFIGURE_ARGS+= --without-gtk2
# XXX remove when lang/lua gets builtin.mk
CONFIGURE_ARGS+= --without-lua
#JMN doesn't build properly on NetBSD, remove when -current is fixed
.if (${OPSYS} == "NetBSD" && \
(empty(OS_VERSION:M6.99.[4-9]?) && empty(OS_VERSION:M[7-9].*)))
CONFIGURE_ARGS+= --without-srtp
.else
CONFIGURE_ARGS+= --with-srtp
PLIST.srtp= YES
.include "../../comms/srtp/buildlink3.mk"
.endif
INSTALL_TARGET= install samples
INSTALLATION_DIRS+= lib/pkgconfig share/doc/${PKGBASE}
@@ -48,17 +57,17 @@ INSTALLATION_DIRS+= ${ASTDATADIR}/sounds/en ${ASTDATADIR}/moh
BUILD_DEFS+= VARBASE
ASTERISK_USER?= asterisk
ASTERISK_GROUP?= asterisk
PKG_GROUPS= ${ASTERISK_GROUP}
PKG_USERS= ${ASTERISK_USER}:${ASTERISK_GROUP}
ASTERISK_USER?= asterisk
ASTERISK_GROUP?= asterisk
PKG_GROUPS= ${ASTERISK_GROUP}
PKG_USERS= ${ASTERISK_USER}:${ASTERISK_GROUP}
PKG_GECOS.${ASTERISK_USER}= Asterisk PBX
PKG_GROUPS_VARS= ASTERISK_GROUP
PKG_USERS_VARS= ASTERISK_USER
FILES_SUBST+= ASTERISK_USER=${ASTERISK_USER}
FILES_SUBST+= ASTERISK_GROUP=${ASTERISK_GROUP}
MESSAGE_SUBST+= ASTERISK_USER=${ASTERISK_USER}
MESSAGE_SUBST+= ASTERISK_GROUP=${ASTERISK_GROUP}
PKG_GROUPS_VARS= ASTERISK_GROUP
PKG_USERS_VARS= ASTERISK_USER
FILES_SUBST+= ASTERISK_USER=${ASTERISK_USER}
FILES_SUBST+= ASTERISK_GROUP=${ASTERISK_GROUP}
MESSAGE_SUBST+= ASTERISK_USER=${ASTERISK_USER}
MESSAGE_SUBST+= ASTERISK_GROUP=${ASTERISK_GROUP}
# Various path settings for Asterisk
PKG_SYSCONFSUBDIR= asterisk
@@ -101,22 +110,28 @@ BUILDLINK_TRANSFORM+= rm:-march=i386
.endif
PLIST_VARS+= kqueue
.if exists(/usr/include/sys/event.h)
.for dir in ${COMPILER_INCLUDE_DIRS}
. if exists(${dir}/sys/event.h)
PLIST.kqueue= yes
.endif
. endif
.endfor
PLIST_VARS+= mgcp
# NOSIGPIPE is a temp variable, since PLIST.mgcp MUST remain undefined
# if the grep fails
NOSIGPIPE!= ${GREP} SO_NOSIGPIPE /usr/include/sys/socket.h || echo ""
.if ${NOSIGPIPE} != ""
PLIST.mgcp= yes
.endif
.for dir in ${COMPILER_INCLUDE_DIRS}
. if (exists(${dir}/sys/socket.h))
NOSIGPIPE!= ${GREP} SO_NOSIGPIPE ${dir}/sys/socket.h || echo ""
. if ${NOSIGPIPE} != ""
PLIST.mgcp= yes
. endif
. endif
.endfor
.include "options.mk"
# check sounds/Makefile for current version when upgrading package
DISTFILES+= asterisk-extra-sounds-en-gsm-1.4.15.tar.gz
DISTFILES+= asterisk-extra-sounds-en-gsm-1.5.tar.gz
# Override default paths in config files
SUBST_CLASSES+= configs
@@ -137,19 +152,24 @@ SUBST_SED.configs+= -e "s|/usr/local/man|${ASTMANDIR}|"
SUBST_SED.configs+= -e "s|/usr/local|${PREFIX}|"
SUBST_SED.configs+= -e "s|/var|${VARBASE}|"
.if (${OPSYS} == "NetBSD")
# XXX gross hack, remove when atomics properly implemented
SUBST_CLASSES+= atomics
SUBST_CLASSES.NetBSD+= atomics
SUBST_STAGE.atomics= post-configure
SUBST_FILES.atomics= include/asterisk/autoconfig.h
SUBST_SED.atomics= -e "s|^\#define HAVE_GCC_ATOMICS 1|\#undef HAVE_GCC_ATOMICS|"
# XXX gross hack, IP_PKTINFO in NetBSD isn't compatible with anything else
SUBST_CLASSES+= pktinfo
SUBST_CLASSES.NetBSD+= pktinfo
SUBST_STAGE.pktinfo= post-configure
SUBST_FILES.pktinfo= include/asterisk/autoconfig.h
SUBST_SED.pktinfo= -e "s|^\#define HAVE_PKTINFO 1|\#undef HAVE_PKTINFO|"
.endif
# XXX gross hack, gethostbyname_r on NETBSD is for internal use only
SUBST_CLASSES.NetBSD+= gethostbyname_r
SUBST_STAGE.gethostbyname_r= post-configure
SUBST_FILES.gethostbyname_r= include/asterisk/autoconfig.h
SUBST_SED.gethostbyname_r= -e "s|^\#define HAVE_GETHOSTBYNAME_R_5 1|\#undef HAVE_GETHOSTBYNAME_R_5|"
SUBST_SED.gethostbyname_r+= -e "s|^\#define HAVE_GETHOSTBYNAME_R_6 1|\#undef HAVE_GETHOSTBYNAME_R_6|"
RCD_SCRIPTS= asterisk
OWN_DIRS_PERMS+= ${ASTDBDIR} ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
@@ -178,8 +198,9 @@ CONF_FILES_PERMS= # empty
CONF_FILES_PERMS+= ${ASTEXAMPLEDIR}/${f:Q} ${PKG_SYSCONFDIR}/${f:Q} ${ASTERISK_USER} ${ASTERISK_GROUP} 0644
.endfor
.if !empty(PKG_OPTIONS:Masterisk-config)
# if we put all the files in $CONF_FILES, the message is _way_ too long.
.for f in acl.conf adsi.conf agents.conf alarmreceiver.conf alsa.conf \
. for f in acl.conf adsi.conf agents.conf alarmreceiver.conf alsa.conf \
amd.conf app_mysql.conf asterisk.adsi calendar.conf ccss.conf \
cdr.conf cdr_adaptive_odbc.conf cdr_custom.conf \
cdr_manager.conf cdr_mysql.conf cdr_odbc.conf cdr_pgsql.conf \
@@ -204,20 +225,25 @@ CONF_FILES_PERMS+= ${ASTEXAMPLEDIR}/${f:Q} ${PKG_SYSCONFDIR}/${f:Q} ${ASTERISK_U
smdi.conf telcordia-1.adsi udptl.conf unistim.conf users.conf \
voicemail.conf vpb.conf xmpp.conf
CONF_FILES_PERMS+= ${ASTEXAMPLEDIR}/${f:Q} ${PKG_SYSCONFDIR}/${f:Q} ${ASTERISK_USER} ${ASTERISK_GROUP} 0644
.endfor
. endfor
.endif
PTHREAD_OPTS+= require native
.if (${OPSYS} == "Darwin" && exists(/usr/include/sys/poll.h))
post-patch:
.if ${OPSYS} == "Darwin"
. for dir in ${COMPILER_INCLUDE_DIRS}
. if exists(${dir}/sys/poll.h)
${ECHO} "#include <sys/poll.h>" > ${WRKSRC}/include/asterisk/poll-compat.h
. endif
. endfor
.endif
post-install:
# check sounds directory for current versions when upgrading package
${TAR} xzf ${WRKSRC}/sounds/asterisk-core-sounds-en-gsm-1.4.27.tar.gz -C ${DESTDIR}${ASTDATADIR}/sounds/en
${TAR} xzf ${WRKSRC}/sounds/asterisk-core-sounds-en-gsm-1.5.tar.gz -C ${DESTDIR}${ASTDATADIR}/sounds/en
${TAR} xzf ${WRKSRC}/sounds/asterisk-moh-opsound-wav-2.03.tar.gz -C ${DESTDIR}${ASTDATADIR}/moh
${TAR} xzf ${DISTDIR}/${DIST_SUBDIR}/asterisk-extra-sounds-en-gsm-1.4.15.tar.gz -C ${DESTDIR}${ASTDATADIR}/sounds/en
${TAR} xzf ${DISTDIR}/${DIST_SUBDIR}/asterisk-extra-sounds-en-gsm-1.5.tar.gz -C ${DESTDIR}${ASTDATADIR}/sounds/en
${INSTALL_DATA} ${WRKSRC}/BUGS ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/CHANGES ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/COPYING ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}

View File

@@ -1,4 +1,4 @@
@comment $NetBSD: PLIST,v 1.10 2015/08/09 04:07:13 jnemeth Exp $
@comment $NetBSD: PLIST,v 1.12 2016/05/05 02:00:33 jnemeth Exp $
include/asterisk.h
include/asterisk/_private.h
include/asterisk/abstract_jb.h
@@ -356,6 +356,7 @@ lib/asterisk/modules/res_security_log.so
lib/asterisk/modules/res_smdi.so
${PLIST.snmp}lib/asterisk/modules/res_snmp.so
lib/asterisk/modules/res_speech.so
${PLIST.srtp}lib/asterisk/modules/res_srtp.so
lib/asterisk/modules/res_stun_monitor.so
${PLIST.kqueue}lib/asterisk/modules/res_timing_kqueue.so
lib/asterisk/modules/res_timing_pthread.so
@@ -382,15 +383,15 @@ libdata/asterisk/phoneprov/000000000000.cfg
libdata/asterisk/phoneprov/polycom.xml
libdata/asterisk/phoneprov/polycom_line.xml
libdata/asterisk/phoneprov/snom-mac.xml
libdata/asterisk/sounds/en/.asterisk-core-sounds-en-gsm-1.4.27
libdata/asterisk/sounds/en/.asterisk-core-sounds-en-gsm-1.5
libdata/asterisk/sounds/en/1-for-am-2-for-pm.gsm
libdata/asterisk/sounds/en/1-yes-2-no.gsm
libdata/asterisk/sounds/en/CHANGES-asterisk-core-en-1.4.27
libdata/asterisk/sounds/en/CHANGES-asterisk-extra-en-1.4.15
libdata/asterisk/sounds/en/CREDITS-asterisk-core-en-1.4.27
libdata/asterisk/sounds/en/CREDITS-asterisk-extra-en-1.4.15
libdata/asterisk/sounds/en/LICENSE-asterisk-core-en-1.4.27
libdata/asterisk/sounds/en/LICENSE-asterisk-extra-en-1.4.15
libdata/asterisk/sounds/en/CHANGES-asterisk-core-en-1.5
libdata/asterisk/sounds/en/CHANGES-asterisk-extra-en-1.5
libdata/asterisk/sounds/en/CREDITS-asterisk-core-en-1.5
libdata/asterisk/sounds/en/CREDITS-asterisk-extra-en-1.5
libdata/asterisk/sounds/en/LICENSE-asterisk-core-en-1.5
libdata/asterisk/sounds/en/LICENSE-asterisk-extra-en-1.5
libdata/asterisk/sounds/en/OfficeSpace.gsm
libdata/asterisk/sounds/en/Randulo-allison.gsm
libdata/asterisk/sounds/en/SIP_Test_Failure.gsm
@@ -468,7 +469,6 @@ libdata/asterisk/sounds/en/astcc-account-number-invalid.gsm
libdata/asterisk/sounds/en/astcc-balance-of-account-is.gsm
libdata/asterisk/sounds/en/astcc-card-number-invalid.gsm
libdata/asterisk/sounds/en/astcc-digit-account-number.gsm
libdata/asterisk/sounds/en/astcc-followed-by-pound.gsm
libdata/asterisk/sounds/en/astcc-followed-by-the-hash-key.gsm
libdata/asterisk/sounds/en/astcc-followed-by-the-pound-key.gsm
libdata/asterisk/sounds/en/astcc-login12pound.gsm
@@ -1604,6 +1604,7 @@ libdata/asterisk/sounds/en/please-hold-minion-connect.gsm
libdata/asterisk/sounds/en/please-hold-while-minion.gsm
libdata/asterisk/sounds/en/please-try-again-later.gsm
libdata/asterisk/sounds/en/please-try-again.gsm
libdata/asterisk/sounds/en/please-try-call-later.gsm
libdata/asterisk/sounds/en/please-try.gsm
libdata/asterisk/sounds/en/please-wait-connect-oncall-eng.gsm
libdata/asterisk/sounds/en/pls-ent-num-transfer.gsm
@@ -1620,7 +1621,6 @@ libdata/asterisk/sounds/en/pls-rcrd-name-at-tone.gsm
libdata/asterisk/sounds/en/pls-stay-on-line.gsm
libdata/asterisk/sounds/en/pls-try-again.gsm
libdata/asterisk/sounds/en/pls-try-area-code.gsm
libdata/asterisk/sounds/en/pls-try-call-later.gsm
libdata/asterisk/sounds/en/pls-try-manually.gsm
libdata/asterisk/sounds/en/pls-wait-connect-call.gsm
libdata/asterisk/sounds/en/plugh.gsm

View File

@@ -1,11 +1,13 @@
$NetBSD: distinfo,v 1.74 2015/08/09 04:07:13 jnemeth Exp $
$NetBSD: distinfo,v 1.80 2016/09/23 19:16:29 jnemeth Exp $
SHA1 (asterisk-11.19.0/asterisk-11.19.0.tar.gz) = e35b9d910cb549b0bea20dbad60760f230bd3881
RMD160 (asterisk-11.19.0/asterisk-11.19.0.tar.gz) = 1dca1ddf50233b57f8f1edcaace76ccd56ca2e7e
Size (asterisk-11.19.0/asterisk-11.19.0.tar.gz) = 34852510 bytes
SHA1 (asterisk-11.19.0/asterisk-extra-sounds-en-gsm-1.4.15.tar.gz) = fbb94494e31fc08eee8fdf2ce7d12eb274018050
RMD160 (asterisk-11.19.0/asterisk-extra-sounds-en-gsm-1.4.15.tar.gz) = 53656a3d6771602504f220ad312093e3503e1150
Size (asterisk-11.19.0/asterisk-extra-sounds-en-gsm-1.4.15.tar.gz) = 4409969 bytes
SHA1 (asterisk-11.23.1/asterisk-11.23.1.tar.gz) = cae7aa5a7e1515928a255f5bd3715f67c13285d3
RMD160 (asterisk-11.23.1/asterisk-11.23.1.tar.gz) = e789fc326db6771e3a865516241dbc47ecb73fd7
SHA512 (asterisk-11.23.1/asterisk-11.23.1.tar.gz) = 6d067ea86a7c050b19e29d6ea25aefd23c3f32bb7d334f4e3c74bcaedaf21e4faeeab71b4fd260fc39f3e12f645c3bf89737f4c2d16f988cc66f93d4e47f80a7
Size (asterisk-11.23.1/asterisk-11.23.1.tar.gz) = 35098451 bytes
SHA1 (asterisk-11.23.1/asterisk-extra-sounds-en-gsm-1.5.tar.gz) = 831ae6442e23cbef1e7d1c84798778ad0b0524d1
RMD160 (asterisk-11.23.1/asterisk-extra-sounds-en-gsm-1.5.tar.gz) = d52df795201c53fc4cd7d99ed41516e312f6f0f3
SHA512 (asterisk-11.23.1/asterisk-extra-sounds-en-gsm-1.5.tar.gz) = c7d3c3fd2c854e6776801312d34bf69bbed78a443c16121637f508c5275f18b1d415cbb6e4f6f8c5aa3769cbbfa1a11485b9972053777f3ac39256c2c81729f1
Size (asterisk-11.23.1/asterisk-extra-sounds-en-gsm-1.5.tar.gz) = 4256538 bytes
SHA1 (patch-Makefile) = 5fd774779d3c8d85936beca8a3407dd3011af2dc
SHA1 (patch-addons_chan__ooh323.c) = 57f61a2edf0f9f022e03837230ee572ec9cf47b4
SHA1 (patch-apps_app__confbridge.c) = c815905994355a19c32e8e3e2eb5dc9f1679eb29
@@ -14,7 +16,7 @@ SHA1 (patch-apps_app__dumpchan.c) = f5a5cc776c99875d1c58e60953fb3f4cec27a94f
SHA1 (patch-apps_app__followme.c) = 0b362486e1759099b61d42a9880109c5743fa0bc
SHA1 (patch-apps_app__meetme.c) = 3927b77fac1cd69f58df4e2ec783359ed0135dad
SHA1 (patch-apps_app__osplookup.c) = 692776511b6a970d29db5fdef9d68af2a3ef6e35
SHA1 (patch-apps_app__queue.c) = c0f477c45c18c1457386f1cbb6bbff74187fc3ca
SHA1 (patch-apps_app__queue.c) = ffed7ef3133d924ef7d176a4f30f369bdd245a42
SHA1 (patch-apps_app__skel.c) = e661a53b61d36343c54be7ad9ea6cde6cb10f180
SHA1 (patch-apps_app__sms.c) = d89b27a9df04d4da98d562241c07d25d182baefc
SHA1 (patch-apps_app__voicemail.c) = 692551a10f51729dd23aa304117eccfb3978c1c8
@@ -24,22 +26,27 @@ SHA1 (patch-cdr_cdr__pgsql.c) = b8c9a67b62bd0ce8dc373a7f5708fdf35f3be0aa
SHA1 (patch-cel_cel__pgsql.c) = f295eca04505d011c6548cdb29ddc292d4540714
SHA1 (patch-channels_chan__motif.c) = db6c97ba02a441633338d492032d78cd86f094f5
SHA1 (patch-channels_chan__oss.c) = 0be259a83c4425d08b693a54c43896da039df721
SHA1 (patch-channels_chan__sip.c) = e711bcb65336ed1803ed92989889258f1d416f6b
SHA1 (patch-configure) = 88619fe9072ff69ed8da0a1917ac3852d10998a4
SHA1 (patch-configure.ac) = 2fdae524cfc95f152b86a32405b80f6edae6fa20
SHA1 (patch-channels_chan__sip.c) = abde08da0038ae87401f682df9140ba0fb6e4557
SHA1 (patch-channels_sip_sdp__crypto.c) = decb6cfe0d6893db912a9087b2155c225db5e1e8
SHA1 (patch-codecs_codec__dahdi.c) = f412e1f60cb49076b8cabcd747c0f0168f1fa9e7
SHA1 (patch-configure) = 7138e0c99c17f01298787e504fa1594b5bdb8572
SHA1 (patch-configure.ac) = 4acdf055e402c810a7e40af9ab8d6afafee60764
SHA1 (patch-contrib_scripts_vmail.cgi) = 650b9bbf3e322d1ad351932cfe6f747baa8f35e4
SHA1 (patch-funcs_func__env.c) = 30ec2c804ea69c4825fe0a888f9e982c7418c528
SHA1 (patch-funcs_func__strings.c) = 4c1db693d845691492b77bbf489764d362de2087
SHA1 (patch-include_asterisk_autoconfig.h.in) = 09a8f8d5398612fdadba25f221b16c19429f81e2
SHA1 (patch-include_asterisk_endian.h) = 41c1a9a9e02fe394bc9261f5559e931b1378ea28
SHA1 (patch-include_asterisk_lock.h) = cb1404e56de4708836091c224df439158119764c
SHA1 (patch-include_asterisk_sha1.h) = ff5a0cdf3423cfa1b95e0215924a88db0d95331f
SHA1 (patch-include_asterisk_strings.h) = fc5987a98429ca470f7e9bdcf170d49b0c1f3407
SHA1 (patch-include_asterisk_utils.h) = 07e70fe0adf39cd9a7f94c735b9a3fa72ae3df89
SHA1 (patch-main_Makefile) = 5f9238a528d2b96777e17a4ac6d3e7876dfffb98
SHA1 (patch-main_acl.c) = 1eac532a15127c25981d2db9462a8ccce2c58620
SHA1 (patch-main_asterisk.c) = bfdbd5299b7279ef080a015a9a10627aa929dd49
SHA1 (patch-main_astmm.c) = 27ff06a6eae9396bde2babeff53d004202d0632a
SHA1 (patch-main_cdr.c) = 3d98a342bdbde81109cccd18943b48168768be77
SHA1 (patch-main_cdr.c) = ee96972504a2b4cb01129928e5fc35b7f1f99b9b
SHA1 (patch-main_cel.c) = 909ace2328c15cda2934dadac35889351be7c4f7
SHA1 (patch-main_channel.c) = f1218badff1354961b49c9e5f35ca2db7d1e4511
SHA1 (patch-main_config__options.c) = e49a946da99546684e8988ca4301bcacbb415987
SHA1 (patch-main_features.c) = 1c11207c60ce53c1101141e07ae04d0ddb838450
SHA1 (patch-main_format.c) = a6d446c3de883cf3ef768d03d39e8d8db068b750
@@ -48,21 +55,28 @@ SHA1 (patch-main_logger.c) = 3c64602c9453c157157f8a0c63056be30ede99c5
SHA1 (patch-main_manager.c) = 6700814350f6960ac7543f587ba6c27a443eeef2
SHA1 (patch-main_named__acl.c) = 48c23ed0e558299679bbfc9e564383f9f7dd181f
SHA1 (patch-main_netsock.c) = 015796266b9806425180c9bb05a1907116ef086d
SHA1 (patch-main_pbx.c) = a3151ae6c09ed69c588dc67cf39c862e10a15bf2
SHA1 (patch-main_sched.c) = 73759369470b575e73ca78f9cff096ebb477c9b1
SHA1 (patch-main_stdtime_localtime.c) = 4b01b34cc2a541487f744b3901c536419c95b394
SHA1 (patch-main_pbx.c) = 049e9883ebbb4e8b2c8913e9e8f310717f6c2168
SHA1 (patch-main_sched.c) = 4b554ff9444e58faa685ec6a2963206b77a00836
SHA1 (patch-main_stdtime_localtime.c) = afbdecc7fdf3b8ea3020a2282003b63d89adb0f3
SHA1 (patch-main_test.c) = 3f239ed7611facbd937057f056ebc7495403dbaf
SHA1 (patch-main_udptl.c) = 260586e4203b4bf51737ba171cbfe57621de8728
SHA1 (patch-main_utils.c) = df8bfd592f82b9b5c2c95a6860d2dca7003f66ca
SHA1 (patch-pbx_pbx__dundi.c) = 4dbcbbae3cbace91c8ed87e3e10cad0a1eb45e75
SHA1 (patch-res_Makefile) = 2b3fa69b155a88e9026005fa6d89f651541bde8a
SHA1 (patch-res_ael_pval.c) = cd8dcb8d82a100c406c397364b0cd5e3655bb06a
SHA1 (patch-res_pjproject_aconfigure) = 0095894c5daac2dec6a9ec745c0ecb8d46c0b73a
SHA1 (patch-res_pjproject_aconfigure.ac) = cbabe4a5f1888e180c93404324ddb96728dc20b9
SHA1 (patch-res_pjproject_build.symbian_makedef.sh) = 37781fe307564ad827e9be67f507f84230ebf299
SHA1 (patch-res_pjproject_pjlib_include_pj_config.h) = 699ff47d099530030b94803fe83c16a3a177d6c1
SHA1 (patch-res_pjproject_pjlib_include_pj_sock__select.h) = 60d0745710ddb7669f45a2ffcc6329ab3bfd5d28
SHA1 (patch-res_pjproject_pjlib_src_pj_sock__select.c) = defc9c86574d295175bad2d5826b01291116a2cd
SHA1 (patch-res_pjproject_third__party_portaudio_src_hostapi_alsa_pa__linux__alsa.c) = 75da38cbe5fd8c4bbb0c1e0825a78c89e29be138
SHA1 (patch-res_pjproject_third__party_portaudio_src_hostapi_oss_pa__unix__oss.c) = 5f3ccac5939b01cf6957b7072bc9ad4679f63e5c
SHA1 (patch-res_res__calendar.c) = a4c491d8c77f88d0834d0eb52622f7c6e4f3428b
SHA1 (patch-res_res__calendar__caldav.c) = 673e8a256fc748338f35c7deddbf283809d19904
SHA1 (patch-res_res__calendar__icalendar.c) = 3258522abbdc5c0cfe76868f73f16931118983e5
SHA1 (patch-res_res__config__pgsql.c) = 719fa8939ca0e6cae256dd1b19a11405f475a620
SHA1 (patch-res_res__timing__kqueue.c) = 36dba3fb1081bccc872145a4d9601e179ac2981a
SHA1 (patch-res_res__xmpp.c) = 25ce66a0536a290598b4c11f14c7ab94f6577af5
SHA1 (patch-sounds_Makefile) = 792c2e25e1c8334fe8c9038b8b630376a5894c31
SHA1 (patch-tests_test__abstract__jb.c) = 42cfa303fc2e399aa9fe3bebf51464d0776e171c

View File

@@ -0,0 +1,34 @@
<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<service_bundle type="manifest" name="export">
<service name="@SMF_PREFIX@/@SMF_NAME@" type="service" version="1">
<create_default_instance enabled="false" />
<single_instance />
<dependency name='network' grouping='require_all' restart_on='error' type='service'>
<service_fmri value='svc:/milestone/network:default' />
</dependency>
<dependency name='filesystem-local' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local:default' />
</dependency>
<method_context>
<method_environment>
<envvar name="LD_PRELOAD_32" value="/usr/lib/extendedFILE.so.1" />
</method_environment>
</method_context>
<exec_method type="method" name="start" exec="@PREFIX@/sbin/asterisk" timeout_seconds="60" />
<exec_method type="method" name="stop" exec="@PREFIX@/sbin/asterisk -nr -x 'core stop gracefully' >/dev/null" timeout_seconds="60" />
<exec_method type="method" name="refresh" exec="@PREFIX@/sbin/asterisk -nr -x 'core reload' >/dev/null" timeout_seconds="60" />
<property_group name="startd" type="framework">
<propval name="duration" type="astring" value="contract" />
<propval name="ignore_error" type="astring" value="core,signal" />
</property_group>
<property_group name="application" type="application">
<propval name="config_file" type="astring" value="@PKG_SYSCONFDIR@/asterisk.conf" />
</property_group>
<template>
<common_name>
<loctext xml:lang="C">Asterisk PBX</loctext>
</common_name>
</template>
</service>
</service_bundle>

View File

@@ -1,15 +1,15 @@
# $NetBSD: options.mk,v 1.7 2015/08/09 04:07:13 jnemeth Exp $
# $NetBSD: options.mk,v 1.8 2015/10/27 08:49:01 jnemeth Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.asterisk
PKG_SUPPORTED_OPTIONS= zaptel x11 unixodbc ilbc webvmail ldap spandsp
PKG_SUPPORTED_OPTIONS+= jabber speex snmp pgsql
PKG_SUPPORTED_OPTIONS+= jabber speex snmp pgsql asterisk-config
PKG_OPTIONS_LEGACY_OPTS+= gtk:x11
PKG_SUGGESTED_OPTIONS= ldap jabber speex
PKG_SUGGESTED_OPTIONS= ldap jabber speex asterisk-config
.include "../../mk/bsd.options.mk"
PLIST_VARS+= zaptel x11 unixodbc webvmail ldap spandsp jabber
PLIST_VARS+= speex snmp pgsql
PLIST_VARS+= speex snmp pgsql srtp
# Asterisk now uses DAHDI, not zaptel; not implemented yet...
#.if !empty(PKG_OPTIONS:Mzaptel)

View File

@@ -1,8 +1,8 @@
$NetBSD: patch-apps_app__queue.c,v 1.5 2015/05/19 07:52:14 jnemeth Exp $
$NetBSD: patch-apps_app__queue.c,v 1.6 2016/05/05 02:00:33 jnemeth Exp $
--- apps/app_queue.c.orig 2015-03-22 23:55:25.000000000 +0000
--- apps/app_queue.c.orig 2016-03-29 19:25:17.000000000 +0000
+++ apps/app_queue.c
@@ -4043,8 +4043,8 @@ static void record_abandoned(struct queu
@@ -4075,8 +4075,8 @@ static void record_abandoned(struct queu
"Uniqueid: %s\r\n"
"Position: %d\r\n"
"OriginalPosition: %d\r\n"
@@ -13,7 +13,81 @@ $NetBSD: patch-apps_app__queue.c,v 1.5 2015/05/19 07:52:14 jnemeth Exp $
qe->parent->callsabandoned++;
ao2_unlock(qe->parent);
@@ -4816,7 +4816,7 @@ static int wait_our_turn(struct queue_en
@@ -4196,8 +4196,8 @@ static struct callattempt *wait_for_answ
struct ast_channel *in = qe->chan;
char on[80] = "";
char membername[80] = "";
- long starttime = 0;
- long endtime = 0;
+ time_t starttime = 0;
+ time_t endtime = 0;
#ifdef HAVE_EPOLL
struct callattempt *epollo;
#endif
@@ -4211,7 +4211,7 @@ static struct callattempt *wait_for_answ
inchan_name = ast_strdupa(ast_channel_name(qe->chan));
ast_channel_unlock(qe->chan);
- starttime = (long) time(NULL);
+ starttime = time(NULL);
#ifdef HAVE_EPOLL
for (epollo = outgoing; epollo; epollo = epollo->q_next) {
if (epollo->chan) {
@@ -4482,7 +4482,7 @@ static struct callattempt *wait_for_answ
ast_cdr_busy(ast_channel_cdr(in));
}
do_hang(o);
- endtime = (long) time(NULL);
+ endtime = time(NULL);
endtime -= starttime;
rna(endtime * 1000, qe, on, membername, qe->parent->autopausebusy);
if (qe->parent->strategy != QUEUE_STRATEGY_RINGALL) {
@@ -4492,7 +4492,7 @@ static struct callattempt *wait_for_answ
/* Have enough time for a queue member to answer? */
if (ast_remaining_ms(start_time_tv, orig) > 500) {
ring_one(qe, outgoing, &numbusies);
- starttime = (long) time(NULL);
+ starttime = time(NULL);
}
}
numbusies++;
@@ -4502,7 +4502,7 @@ static struct callattempt *wait_for_answ
if (ast_channel_cdr(in)) {
ast_cdr_busy(ast_channel_cdr(in));
}
- endtime = (long) time(NULL);
+ endtime = time(NULL);
endtime -= starttime;
rna(endtime * 1000, qe, on, membername, qe->parent->autopauseunavail);
do_hang(o);
@@ -4512,7 +4512,7 @@ static struct callattempt *wait_for_answ
}
if (ast_remaining_ms(start_time_tv, orig) > 500) {
ring_one(qe, outgoing, &numbusies);
- starttime = (long) time(NULL);
+ starttime = time(NULL);
}
}
numbusies++;
@@ -4598,7 +4598,7 @@ static struct callattempt *wait_for_answ
}
ast_frfree(f);
} else { /* ast_read() returned NULL */
- endtime = (long) time(NULL) - starttime;
+ endtime = time(NULL) - starttime;
rna(endtime * 1000, qe, on, membername, 1);
do_hang(o);
if (qe->parent->strategy != QUEUE_STRATEGY_RINGALL) {
@@ -4607,7 +4607,7 @@ static struct callattempt *wait_for_answ
}
if (ast_remaining_ms(start_time_tv, orig) > 500) {
ring_one(qe, outgoing, &numbusies);
- starttime = (long) time(NULL);
+ starttime = time(NULL);
}
}
}
@@ -4853,7 +4853,7 @@ static int wait_our_turn(struct queue_en
if ((status = get_member_status(qe->parent, qe->max_penalty, qe->min_penalty, qe->parent->leavewhenempty, 0))) {
*reason = QUEUE_LEAVEEMPTY;
@@ -22,7 +96,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.5 2015/05/19 07:52:14 jnemeth Exp $
leave_queue(qe);
break;
}
@@ -5056,12 +5056,12 @@ static void send_agent_complete(const st
@@ -5103,12 +5103,12 @@ static void send_agent_complete(const st
"Channel: %s\r\n"
"Member: %s\r\n"
"MemberName: %s\r\n"
@@ -38,7 +112,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.5 2015/05/19 07:52:14 jnemeth Exp $
qe->parent->eventwhencalled == QUEUE_EVENT_VARIABLES ? vars2manager(qe->chan, vars, vars_len) : "");
}
@@ -5104,9 +5104,9 @@ static void queue_transfer_fixup(void *d
@@ -5151,9 +5151,9 @@ static void queue_transfer_fixup(void *d
int callcompletedinsl = qtds->callcompletedinsl;
struct ast_datastore *datastore;
@@ -51,7 +125,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.5 2015/05/19 07:52:14 jnemeth Exp $
update_queue(qe->parent, member, callcompletedinsl, (time(NULL) - callstart));
@@ -5624,7 +5624,7 @@ static int try_calling(struct queue_ent
@@ -5674,7 +5674,7 @@ static int try_calling(struct queue_ent
} else if (ast_check_hangup(qe->chan)) {
/* Caller must have hung up just before being connected */
ast_log(LOG_NOTICE, "Caller was about to talk to agent on %s but the caller hungup.\n", ast_channel_name(peer));
@@ -60,7 +134,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.5 2015/05/19 07:52:14 jnemeth Exp $
record_abandoned(qe);
ast_autoservice_chan_hangup_peer(qe->chan, peer);
ao2_ref(member, -1);
@@ -5664,8 +5664,8 @@ static int try_calling(struct queue_ent
@@ -5714,8 +5714,8 @@ static int try_calling(struct queue_ent
/* if setinterfacevar is defined, make member variables available to the channel */
/* use pbx_builtin_setvar to set a load of variables with one call */
if (qe->parent->setinterfacevar) {
@@ -71,7 +145,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.5 2015/05/19 07:52:14 jnemeth Exp $
pbx_builtin_setvar_multiple(qe->chan, interfacevar);
pbx_builtin_setvar_multiple(peer, interfacevar);
}
@@ -5673,8 +5673,8 @@ static int try_calling(struct queue_ent
@@ -5723,8 +5723,8 @@ static int try_calling(struct queue_ent
/* if setqueueentryvar is defined, make queue entry (i.e. the caller) variables available to the channel */
/* use pbx_builtin_setvar to set a load of variables with one call */
if (qe->parent->setqueueentryvar) {
@@ -82,18 +156,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.5 2015/05/19 07:52:14 jnemeth Exp $
pbx_builtin_setvar_multiple(qe->chan, interfacevar);
pbx_builtin_setvar_multiple(peer, interfacevar);
}
@@ -5891,8 +5891,8 @@ static int try_calling(struct queue_ent
}
}
qe->handled++;
- ast_queue_log(queuename, ast_channel_uniqueid(qe->chan), member->membername, "CONNECT", "%ld|%s|%ld", (long) (time(NULL) - qe->start), ast_channel_uniqueid(peer),
- (long)(orig - to > 0 ? (orig - to) / 1000 : 0));
+ ast_queue_log(queuename, ast_channel_uniqueid(qe->chan), member->membername, "CONNECT", "%jd|%s|%jd", (intmax_t) (time(NULL) - qe->start), ast_channel_uniqueid(peer),
+ (intmax_t)(orig - to > 0 ? (orig - to) / 1000 : 0));
if (ast_channel_cdr(qe->chan)) {
struct ast_cdr *cdr;
@@ -5946,12 +5946,12 @@ static int try_calling(struct queue_ent
@@ -6018,12 +6018,12 @@ static int try_calling(struct queue_ent
"Channel: %s\r\n"
"Member: %s\r\n"
"MemberName: %s\r\n"
@@ -109,7 +172,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.5 2015/05/19 07:52:14 jnemeth Exp $
qe->parent->eventwhencalled == QUEUE_EVENT_VARIABLES ? vars2manager(qe->chan, vars, sizeof(vars)) : "");
ast_copy_string(oldcontext, ast_channel_context(qe->chan), sizeof(oldcontext));
ast_copy_string(oldexten, ast_channel_exten(qe->chan), sizeof(oldexten));
@@ -5983,17 +5983,17 @@ static int try_calling(struct queue_ent
@@ -6055,17 +6055,17 @@ static int try_calling(struct queue_ent
/* detect a blind transfer */
if (!(ast_channel_softhangup_internal_flag(qe->chan) | ast_channel_softhangup_internal_flag(peer)) && (strcasecmp(oldcontext, ast_channel_context(qe->chan)) || strcasecmp(oldexten, ast_channel_exten(qe->chan)))) {
@@ -134,7 +197,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.5 2015/05/19 07:52:14 jnemeth Exp $
send_agent_complete(qe, queuename, peer, member, callstart, vars, sizeof(vars), AGENT);
}
if ((tds = ast_channel_datastore_find(qe->chan, &queue_transfer_info, NULL))) {
@@ -7126,8 +7126,8 @@ static int queue_exec(struct ast_channel
@@ -7234,8 +7234,8 @@ static int queue_exec(struct ast_channel
}
}
@@ -145,7 +208,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.5 2015/05/19 07:52:14 jnemeth Exp $
qe.chan = chan;
qe.prio = prio;
@@ -7177,8 +7177,8 @@ check_turns:
@@ -7285,8 +7285,8 @@ check_turns:
record_abandoned(&qe);
reason = QUEUE_TIMEOUT;
res = 0;
@@ -156,7 +219,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.5 2015/05/19 07:52:14 jnemeth Exp $
break;
}
@@ -7222,7 +7222,7 @@ check_turns:
@@ -7331,7 +7331,7 @@ check_turns:
if ((status = get_member_status(qe.parent, qe.max_penalty, qe.min_penalty, qe.parent->leavewhenempty, 0))) {
record_abandoned(&qe);
reason = QUEUE_LEAVEEMPTY;
@@ -165,7 +228,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.5 2015/05/19 07:52:14 jnemeth Exp $
res = 0;
break;
}
@@ -7244,7 +7244,7 @@ check_turns:
@@ -7354,7 +7354,7 @@ check_turns:
record_abandoned(&qe);
reason = QUEUE_TIMEOUT;
res = 0;
@@ -174,7 +237,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.5 2015/05/19 07:52:14 jnemeth Exp $
break;
}
@@ -7272,8 +7272,8 @@ stop:
@@ -7382,8 +7382,8 @@ stop:
if (!qe.handled) {
record_abandoned(&qe);
ast_queue_log(args.queuename, ast_channel_uniqueid(chan), "NONE", "ABANDON",
@@ -185,7 +248,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.5 2015/05/19 07:52:14 jnemeth Exp $
res = -1;
} else if (qcontinue) {
reason = QUEUE_CONTINUE;
@@ -7281,7 +7281,7 @@ stop:
@@ -7391,7 +7391,7 @@ stop:
}
} else if (qe.valid_digits) {
ast_queue_log(args.queuename, ast_channel_uniqueid(chan), "NONE", "EXITWITHKEY",
@@ -194,18 +257,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.5 2015/05/19 07:52:14 jnemeth Exp $
}
}
@@ -8404,8 +8404,8 @@ static char *__queues_show(struct manses
mem->paused ? " (paused)" : "",
ast_devstate2str(mem->status));
if (mem->calls) {
- ast_str_append(&out, 0, " has taken %d calls (last was %ld secs ago)",
- mem->calls, (long) (time(NULL) - mem->lastcall));
+ ast_str_append(&out, 0, " has taken %d calls (last was %jd secs ago)",
+ mem->calls, (intmax_t) (time(NULL) - mem->lastcall));
} else {
ast_str_append(&out, 0, " has taken no calls yet");
}
@@ -8422,9 +8422,9 @@ static char *__queues_show(struct manses
@@ -8538,9 +8538,9 @@ static char *__queues_show(struct manses
do_print(s, fd, " Callers: ");
for (qe = q->head; qe; qe = qe->next) {
@@ -218,7 +270,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.5 2015/05/19 07:52:14 jnemeth Exp $
do_print(s, fd, ast_str_buffer(out));
}
}
@@ -8782,7 +8782,7 @@ static int manager_queues_status(struct
@@ -8900,7 +8900,7 @@ static int manager_queues_status(struct
"CallerIDName: %s\r\n"
"ConnectedLineNum: %s\r\n"
"ConnectedLineName: %s\r\n"
@@ -227,7 +279,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.5 2015/05/19 07:52:14 jnemeth Exp $
"%s"
"\r\n",
q->name, pos++, ast_channel_name(qe->chan), ast_channel_uniqueid(qe->chan),
@@ -8790,7 +8790,7 @@ static int manager_queues_status(struct
@@ -8908,7 +8908,7 @@ static int manager_queues_status(struct
S_COR(ast_channel_caller(qe->chan)->id.name.valid, ast_channel_caller(qe->chan)->id.name.str, "unknown"),
S_COR(ast_channel_connected(qe->chan)->id.number.valid, ast_channel_connected(qe->chan)->id.number.str, "unknown"),
S_COR(ast_channel_connected(qe->chan)->id.name.valid, ast_channel_connected(qe->chan)->id.name.str, "unknown"),

View File

@@ -1,8 +1,8 @@
$NetBSD: patch-channels_chan__sip.c,v 1.2 2015/05/19 07:52:14 jnemeth Exp $
$NetBSD: patch-channels_chan__sip.c,v 1.3 2016/02/07 08:18:43 jnemeth Exp $
--- channels/chan_sip.c.orig 2015-03-19 09:39:28.000000000 +0000
--- channels/chan_sip.c.orig 2016-02-03 21:23:32.000000000 +0000
+++ channels/chan_sip.c
@@ -17515,6 +17515,8 @@ static int get_rdnis(struct sip_pvt *p,
@@ -17571,6 +17571,8 @@ static int get_rdnis(struct sip_pvt *p,
return 0;
}
@@ -11,7 +11,7 @@ $NetBSD: patch-channels_chan__sip.c,v 1.2 2015/05/19 07:52:14 jnemeth Exp $
/*!
* \brief Find out who the call is for.
*
@@ -17532,7 +17534,7 @@ static int get_rdnis(struct sip_pvt *p,
@@ -17588,7 +17590,7 @@ static int get_rdnis(struct sip_pvt *p,
static enum sip_get_dest_result get_destination(struct sip_pvt *p, struct sip_request *oreq, int *cc_recall_core_id)
{
char tmp[256] = "", *uri, *unused_password, *domain;
@@ -20,7 +20,7 @@ $NetBSD: patch-channels_chan__sip.c,v 1.2 2015/05/19 07:52:14 jnemeth Exp $
char *from = NULL;
struct sip_request *req;
char *decoded_uri;
@@ -18405,6 +18407,8 @@ static enum check_auth_result check_peer
@@ -18467,6 +18469,8 @@ static enum check_auth_result check_peer
return res;
}
@@ -29,7 +29,7 @@ $NetBSD: patch-channels_chan__sip.c,v 1.2 2015/05/19 07:52:14 jnemeth Exp $
/*! \brief Check if matching user or peer is defined
Match user on From: user name and peer on IP/port
@@ -18416,8 +18420,8 @@ static enum check_auth_result check_user
@@ -18478,8 +18482,8 @@ static enum check_auth_result check_user
struct ast_sockaddr *addr, struct sip_peer **authpeer)
{
char *of, *name, *unused_password, *domain;
@@ -40,7 +40,7 @@ $NetBSD: patch-channels_chan__sip.c,v 1.2 2015/05/19 07:52:14 jnemeth Exp $
enum check_auth_result res = AUTH_DONT_KNOW;
char calleridname[256];
char *uri2 = ast_strdupa(uri);
@@ -19054,7 +19058,7 @@ static int manager_show_registry(struct
@@ -19116,7 +19120,7 @@ static int manager_show_registry(struct
"DomainPort: %d\r\n"
"Refresh: %d\r\n"
"State: %s\r\n"
@@ -49,7 +49,7 @@ $NetBSD: patch-channels_chan__sip.c,v 1.2 2015/05/19 07:52:14 jnemeth Exp $
"\r\n",
idtext,
iterator->hostname,
@@ -19064,7 +19068,7 @@ static int manager_show_registry(struct
@@ -19126,7 +19130,7 @@ static int manager_show_registry(struct
iterator->regdomainport ? iterator->regdomainport : STANDARD_SIP_PORT,
iterator->refresh,
regstate2str(iterator->regstate),
@@ -58,7 +58,7 @@ $NetBSD: patch-channels_chan__sip.c,v 1.2 2015/05/19 07:52:14 jnemeth Exp $
ASTOBJ_UNLOCK(iterator);
total++;
} while(0));
@@ -29112,8 +29116,8 @@ static int check_rtp_timeout(struct sip_
@@ -29237,8 +29241,8 @@ static int check_rtp_timeout(struct sip_
*/
return 0;
}
@@ -68,4 +68,4 @@ $NetBSD: patch-channels_chan__sip.c,v 1.2 2015/05/19 07:52:14 jnemeth Exp $
+ ast_channel_name(dialog->owner), (intmax_t) (t - dialog->lastrtprx));
manager_event(EVENT_FLAG_CALL, "SessionTimeout", "Source: RTPTimeout\r\n"
"Channel: %s\r\nUniqueid: %s\r\n", ast_channel_name(dialog->owner), ast_channel_uniqueid(dialog->owner));
/* Issue a softhangup */
/* Issue a softhangup - cause 44 (as used by Cisco for RTP timeouts) */

View File

@@ -0,0 +1,25 @@
$NetBSD: patch-channels_sip_sdp__crypto.c,v 1.1 2015/10/27 08:49:01 jnemeth Exp $
--- channels/sip/sdp_crypto.c.orig 2015-10-09 22:23:39.000000000 +0000
+++ channels/sip/sdp_crypto.c
@@ -187,6 +187,7 @@ err:
int sdp_crypto_process(struct sdp_crypto *p, const char *attr, struct ast_rtp_instance *rtp, struct sip_srtp *srtp)
{
+ char buf[10];
char *str = NULL;
char *tag = NULL;
char *suite = NULL;
@@ -220,8 +221,10 @@ int sdp_crypto_process(struct sdp_crypto
return -1;
}
- /* RFC4568 9.1 - tag is 1-9 digits, greater than zero */
- if (sscanf(tag, "%30d", &p->tag) != 1 || p->tag <= 0 || p->tag > 999999999) {
+ /* RFC4568 9.1 - tag is 1-9 digits */
+ p->tag = atoi(tag);
+ snprintf(buf, sizeof(buf), "%d", p->tag);
+ if (strcmp(buf, tag) || p->tag < 0 || p->tag > 999999999) {
ast_log(LOG_WARNING, "Unacceptable a=crypto tag: %s\n", tag);
return -1;
}

View File

@@ -0,0 +1,15 @@
$NetBSD: patch-codecs_codec__dahdi.c,v 1.1 2015/10/27 08:49:01 jnemeth Exp $
--- codecs/codec_dahdi.c.orig 2015-10-09 22:23:39.000000000 +0000
+++ codecs/codec_dahdi.c
@@ -37,9 +37,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revisi
#include <fcntl.h>
#include <netinet/in.h>
+#include <poll.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
-#include <sys/poll.h>
#include <dahdi/user.h>
#include "asterisk/lock.h"

View File

@@ -1,8 +1,17 @@
$NetBSD: patch-configure,v 1.4 2013/06/14 04:26:55 jnemeth Exp $
$NetBSD: patch-configure,v 1.6 2016/09/23 19:16:29 jnemeth Exp $
--- configure.orig 2013-02-27 12:22:30.000000000 +0000
--- configure.orig 2015-10-09 22:23:39.000000000 +0000
+++ configure
@@ -14200,7 +14200,7 @@ fi
@@ -12409,7 +12409,7 @@ fi
done
-ac_fn_c_check_header_mongrel "$LINENO" "sys/poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default"
+ac_fn_c_check_header_mongrel "$LINENO" "poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_poll_h" = xyes; then :
else
@@ -14464,7 +14464,7 @@ fi
done
@@ -11,27 +20,7 @@ $NetBSD: patch-configure,v 1.4 2013/06/14 04:26:55 jnemeth Exp $
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -16195,16 +16195,16 @@ if $(${CC} -march=native -S -o /dev/null
if test "${CONFIG_CFLAGS}" = ""; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- AST_NATIVE_ARCH=1
+ AST_NATIVE_ARCH=0
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: user CFLAGS present" >&5
$as_echo "user CFLAGS present" >&6; }
- AST_NATIVE_ARCH=
+ AST_NATIVE_ARCH=0
fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- AST_NATIVE_ARCH=
+ AST_NATIVE_ARCH=0
fi
@@ -16729,6 +16729,148 @@ fi
@@ -16968,6 +16968,148 @@ fi
@@ -180,7 +169,7 @@ $NetBSD: patch-configure,v 1.4 2013/06/14 04:26:55 jnemeth Exp $
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
@@ -17871,6 +18013,8 @@ $as_echo_n "checking if \"struct ifaddrs
@@ -18218,6 +18360,8 @@ $as_echo_n "checking if \"struct ifaddrs
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */

View File

@@ -1,8 +1,17 @@
$NetBSD: patch-configure.ac,v 1.2 2013/06/14 04:26:55 jnemeth Exp $
$NetBSD: patch-configure.ac,v 1.4 2016/09/23 19:16:29 jnemeth Exp $
--- configure.ac.orig 2013-02-26 19:45:09.000000000 +0000
--- configure.ac.orig 2015-10-09 22:23:39.000000000 +0000
+++ configure.ac
@@ -584,7 +584,7 @@ AC_FUNC_STRNLEN
@@ -543,7 +543,7 @@ AC_CHECK_HEADERS([xlocale.h])
AC_CHECK_HEADERS([winsock.h winsock2.h])
-AC_CHECK_HEADER([sys/poll.h],
+AC_CHECK_HEADER([poll.h],
[],
AC_DEFINE([AST_POLL_COMPAT], 1, [Define to 1 if internal poll should be used.]))
@@ -597,7 +597,7 @@ AC_FUNC_STRNLEN
AC_FUNC_STRTOD
AC_FUNC_UTIME_NULL
AC_FUNC_VPRINTF
@@ -11,16 +20,19 @@ $NetBSD: patch-configure.ac,v 1.2 2013/06/14 04:26:55 jnemeth Exp $
# NOTE: we use AC_CHECK_LIB to get -lm into the arguments for later checks,
# so that AC_CHECK_FUNCS can detect functions in that library.
@@ -1036,7 +1036,7 @@ if $(${CC} -march=native -S -o /dev/null
fi
else
AC_MSG_RESULT(no)
- AST_NATIVE_ARCH=
+ AST_NATIVE_ARCH=0
fi
AC_SUBST(AST_NATIVE_ARCH)
@@ -648,9 +648,9 @@ AC_SUBST(PBX_DYNAMIC_LIST)
LDFLAGS=${old_LDFLAGS}
rm -f conftest.dynamics
@@ -1160,6 +1160,9 @@ AST_C_DEFINE_CHECK([IP_MTU_DISCOVER], [I
-AC_CHECK_HEADER([sys/poll.h],
+AC_CHECK_HEADER([poll.h],
[HAS_POLL=1]
- AC_DEFINE([HAVE_SYS_POLL_H], 1, [Define to 1 if your system has working sys/poll.h]),
+ AC_DEFINE([HAVE_SYS_POLL_H], 1, [Define to 1 if your system has working poll.h]),
)
AC_ARG_ENABLE([internal-poll],
@@ -1162,6 +1162,9 @@ AST_C_DEFINE_CHECK([IP_MTU_DISCOVER], [I
AC_CHECK_HEADER([libkern/OSAtomic.h],
[AC_DEFINE_UNQUOTED([HAVE_OSX_ATOMICS], 1, [Define to 1 if OSX atomic operations are supported.])])

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-funcs_func__env.c,v 1.1 2015/10/27 08:49:01 jnemeth Exp $
--- funcs/func_env.c.orig 2015-10-09 22:23:39.000000000 +0000
+++ funcs/func_env.c
@@ -309,7 +309,7 @@ static int stat_read(struct ast_channel
snprintf(buf, len, "%d", (int) s.st_ctime);
break;
case 'm':
- snprintf(buf, len, "%o", s.st_mode);
+ snprintf(buf, len, "%o", (unsigned int) s.st_mode);
break;
}
}

View File

@@ -0,0 +1,131 @@
$NetBSD: patch-include_asterisk_sha1.h,v 1.1 2016/09/23 19:16:29 jnemeth Exp $
--- include/asterisk/sha1.h.orig 2016-09-08 16:28:35.000000000 +0000
+++ include/asterisk/sha1.h
@@ -191,49 +191,6 @@ typedef struct SHA256Context SHA224Conte
typedef struct SHA512Context SHA384Context;
/*
- * This structure holds context information for all SHA
- * hashing operations.
- */
-typedef struct USHAContext {
- int whichSha; /* which SHA is being used */
- union {
- SHA1Context sha1Context;
- SHA224Context sha224Context; SHA256Context sha256Context;
- SHA384Context sha384Context; SHA512Context sha512Context;
- } ctx;
-} USHAContext;
-
-/*
- * This structure will hold context information for the HMAC
- * keyed-hashing operation.
- */
-typedef struct HMACContext {
- int whichSha; /* which SHA is being used */
- int hashSize; /* hash size of SHA being used */
- int blockSize; /* block size of SHA being used */
- USHAContext shaContext; /* SHA context */
- unsigned char k_opad[USHA_Max_Message_Block_Size];
- /* outer padding - key XORd with opad */
- int Computed; /* Is the MAC computed? */
- int Corrupted; /* Cumulative corruption code */
-
-} HMACContext;
-
-/*
- * This structure will hold context information for the HKDF
- * extract-and-expand Key Derivation Functions.
- */
-typedef struct HKDFContext {
- int whichSha; /* which SHA is being used */
- HMACContext hmacContext;
- int hashSize; /* hash size of SHA being used */
- unsigned char prk[USHAMaxHashSize];
- /* pseudo-random key - output of hkdfInput */
- int Computed; /* Is the key material computed? */
- int Corrupted; /* Cumulative corruption code */
-} HKDFContext;
-
-/*
* Function Prototypes
*/
@@ -281,76 +238,6 @@ extern int SHA512FinalBits(SHA512Context
extern int SHA512Result(SHA512Context *,
uint8_t Message_Digest[SHA512HashSize]);
-/* Unified SHA functions, chosen by whichSha */
-extern int USHAReset(USHAContext *context, SHAversion whichSha);
-extern int USHAInput(USHAContext *context,
- const uint8_t *bytes, unsigned int bytecount);
-extern int USHAFinalBits(USHAContext *context,
- uint8_t bits, unsigned int bit_count);
-extern int USHAResult(USHAContext *context,
- uint8_t Message_Digest[USHAMaxHashSize]);
-extern int USHABlockSize(enum SHAversion whichSha);
-extern int USHAHashSize(enum SHAversion whichSha);
-extern int USHAHashSizeBits(enum SHAversion whichSha);
-extern const char *USHAHashName(enum SHAversion whichSha);
-
-/*
- * HMAC Keyed-Hashing for Message Authentication, RFC 2104,
- * for all SHAs.
- * This interface allows a fixed-length text input to be used.
- */
-extern int hmac(SHAversion whichSha, /* which SHA algorithm to use */
- const unsigned char *text, /* pointer to data stream */
- int text_len, /* length of data stream */
- const unsigned char *key, /* pointer to authentication key */
- int key_len, /* length of authentication key */
- uint8_t digest[USHAMaxHashSize]); /* caller digest to fill in */
-
-/*
- * HMAC Keyed-Hashing for Message Authentication, RFC 2104,
- * for all SHAs.
- * This interface allows any length of text input to be used.
- */
-extern int hmacReset(HMACContext *context, enum SHAversion whichSha,
- const unsigned char *key, int key_len);
-extern int hmacInput(HMACContext *context, const unsigned char *text,
- int text_len);
-extern int hmacFinalBits(HMACContext *context, uint8_t bits,
- unsigned int bit_count);
-extern int hmacResult(HMACContext *context,
- uint8_t digest[USHAMaxHashSize]);
-
-/*
- * HKDF HMAC-based Extract-and-Expand Key Derivation Function,
- * RFC 5869, for all SHAs.
- */
-extern int hkdf(SHAversion whichSha, const unsigned char *salt,
- int salt_len, const unsigned char *ikm, int ikm_len,
- const unsigned char *info, int info_len,
- uint8_t okm[ ], int okm_len);
-extern int hkdfExtract(SHAversion whichSha, const unsigned char *salt,
- int salt_len, const unsigned char *ikm,
- int ikm_len, uint8_t prk[USHAMaxHashSize]);
-extern int hkdfExpand(SHAversion whichSha, const uint8_t prk[ ],
- int prk_len, const unsigned char *info,
- int info_len, uint8_t okm[ ], int okm_len);
-
-/*
- * HKDF HMAC-based Extract-and-Expand Key Derivation Function,
- * RFC 5869, for all SHAs.
- * This interface allows any length of text input to be used.
- */
-extern int hkdfReset(HKDFContext *context, enum SHAversion whichSha,
- const unsigned char *salt, int salt_len);
-extern int hkdfInput(HKDFContext *context, const unsigned char *ikm,
- int ikm_len);
-extern int hkdfFinalBits(HKDFContext *context, uint8_t ikm_bits,
- unsigned int ikm_bit_count);
-extern int hkdfResult(HKDFContext *context,
- uint8_t prk[USHAMaxHashSize],
- const unsigned char *info, int info_len,
- uint8_t okm[USHAMaxHashSize], int okm_len);
-
/************************ sha-private.h ************************/
/***************** See RFC 6234 for details. *******************/
/*

View File

@@ -1,6 +1,6 @@
$NetBSD: patch-main_cdr.c,v 1.1 2015/05/19 07:52:14 jnemeth Exp $
$NetBSD: patch-main_cdr.c,v 1.2 2015/10/27 08:49:01 jnemeth Exp $
--- main/cdr.c.orig 2013-08-06 08:19:42.000000000 +0000
--- main/cdr.c.orig 2015-10-09 22:23:39.000000000 +0000
+++ main/cdr.c
@@ -260,7 +260,7 @@ static const char *ast_cdr_getvar_intern
static void cdr_get_tv(struct timeval when, const char *fmt, char *buf, int bufsize)
@@ -23,7 +23,7 @@ $NetBSD: patch-main_cdr.c,v 1.1 2015/05/19 07:52:14 jnemeth Exp $
} else if (!strcasecmp(name, "disposition")) {
if (raw) {
- snprintf(workspace, workspacelen, "%ld", cdr->disposition);
+ snprintf(workspace, workspacelen, "%jd", cdr->disposition);
+ snprintf(workspace, workspacelen, "%jd", (intmax_t)cdr->disposition);
} else {
ast_copy_string(workspace, ast_cdr_disp2str(cdr->disposition), workspacelen);
}

View File

@@ -0,0 +1,22 @@
$NetBSD: patch-main_channel.c,v 1.1 2015/10/27 08:49:01 jnemeth Exp $
--- main/channel.c.orig 2015-10-24 19:56:31.000000000 +0000
+++ main/channel.c
@@ -5907,15 +5907,8 @@ static int set_security_requirements(con
ast_channel_unlock(r);
for (i = 0; i < 2; i++) {
- if (ops[i][1]) {
- if (ast_channel_setoption(out, ops[i][0], &ops[i][1], sizeof(ops[i][1]), 0)) {
- /* We require a security feature, but the channel won't provide it */
- return -1;
- }
- } else {
- /* We don't care if we can't clear the option on a channel that doesn't support it */
- ast_channel_setoption(out, ops[i][0], &ops[i][1], sizeof(ops[i][1]), 0);
- }
+ /* We don't care if we can't clear the option on a channel that doesn't support it */
+ ast_channel_setoption(out, ops[i][0], &ops[i][1], sizeof(ops[i][1]), 0);
}
return 0;

View File

@@ -1,8 +1,8 @@
$NetBSD: patch-main_pbx.c,v 1.1 2015/05/19 07:52:14 jnemeth Exp $
$NetBSD: patch-main_pbx.c,v 1.2 2015/10/27 08:49:01 jnemeth Exp $
--- main/pbx.c.orig 2015-01-30 16:55:39.000000000 +0000
--- main/pbx.c.orig 2015-10-09 22:23:39.000000000 +0000
+++ main/pbx.c
@@ -11201,7 +11201,7 @@ static int testtime_write(struct ast_cha
@@ -11427,7 +11427,7 @@ static int testtime_write(struct ast_cha
sscanf(remainder, "%79s", timezone);
tv = ast_mktime(&tm, S_OR(timezone, NULL));
@@ -11,7 +11,16 @@ $NetBSD: patch-main_pbx.c,v 1.1 2015/05/19 07:52:14 jnemeth Exp $
pbx_builtin_setvar_helper(chan, "__TESTTIME", result);
return 0;
}
@@ -11235,7 +11235,7 @@ static int pbx_builtin_gotoiftime(struct
@@ -11446,7 +11446,7 @@ static int pbx_builtin_gotoiftime(struct
struct ast_timing timing;
const char *ctime;
struct timeval tv = ast_tvnow();
- long timesecs;
+ intmax_t timesecs;
if (!chan) {
ast_log(LOG_WARNING, "GotoIfTime requires a channel on which to operate\n");
@@ -11461,7 +11461,7 @@ static int pbx_builtin_gotoiftime(struct
ts = s = ast_strdupa(data);
ast_channel_lock(chan);

View File

@@ -1,29 +1,27 @@
$NetBSD: patch-main_sched.c,v 1.1 2012/12/11 08:22:49 jnemeth Exp $
$NetBSD: patch-main_sched.c,v 1.3 2016/02/07 08:18:43 jnemeth Exp $
--- main/sched.c.orig 2012-06-15 16:20:16.000000000 +0000
--- main/sched.c.orig 2016-02-03 21:23:32.000000000 +0000
+++ main/sched.c
@@ -349,7 +349,7 @@ static int sched_settime(struct timeval
{
struct timeval now = ast_tvnow();
@@ -492,7 +492,7 @@ static int sched_settime(struct timeval
ast_assert(0);
}
- /*ast_debug(1, "TV -> %lu,%lu\n", tv->tv_sec, tv->tv_usec);*/
+ /*ast_debug(1, "TV -> %jd,%jd\n", tv->tv_sec, tv->tv_usec);*/
+ /*ast_debug(1, "TV -> %jd,%lu\n", (intmax_t)tv->tv_sec, tv->tv_usec);*/
if (ast_tvzero(*t)) /* not supplied, default to now */
*t = now;
*t = ast_tvadd(*t, ast_samp2tv(when, 1000));
@@ -557,12 +557,12 @@ void ast_sched_dump(struct ast_sched_con
@@ -706,11 +706,11 @@ void ast_sched_dump(struct ast_sched_con
struct timeval delta;
q = ast_heap_peek(con->sched_heap, x);
delta = ast_tvsub(q->when, when);
- ast_debug(1, "|%.4d | %-15p | %-15p | %.6ld : %.6ld |\n",
+ ast_debug(1, "|%.4d | %-15p | %-15p | %.6jd : %.6jd |\n",
q->id,
+ ast_debug(1, "|%.4d | %-15p | %-15p | %.6jd : %.6ld |\n",
q->sched_id->id,
q->callback,
q->data,
- (long)delta.tv_sec,
- (long int)delta.tv_usec);
+ (intmax_t)delta.tv_sec,
+ (intmax_t)delta.tv_usec);
(long int)delta.tv_usec);
}
ast_mutex_unlock(&con->lock);
ast_debug(1, "=============================================================\n");

View File

@@ -1,8 +1,19 @@
$NetBSD: patch-main_stdtime_localtime.c,v 1.2 2015/05/19 07:52:14 jnemeth Exp $
$NetBSD: patch-main_stdtime_localtime.c,v 1.3 2015/10/27 08:49:01 jnemeth Exp $
--- main/stdtime/localtime.c.orig 2015-03-10 17:42:57.000000000 +0000
--- main/stdtime/localtime.c.orig 2015-10-09 22:23:39.000000000 +0000
+++ main/stdtime/localtime.c
@@ -733,7 +733,7 @@ static void *notify_daemon(void *data)
@@ -67,6 +67,10 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revisi
#include <sys/stat.h>
#include <fcntl.h>
#endif
+#ifdef __sun
+#include <time.h>
+#include <xlocale.h>
+#endif
#include "private.h"
#include "tzfile.h"
@@ -733,7 +737,7 @@ static void *notify_daemon(void *data)
if (st.st_mtime > cur->mtime[0] || lst.st_mtime > cur->mtime[1]) {
#ifdef TEST_FRAMEWORK
if (test) {
@@ -11,7 +22,7 @@ $NetBSD: patch-main_stdtime_localtime.c,v 1.2 2015/05/19 07:52:14 jnemeth Exp $
} else
#endif
{
@@ -2417,6 +2417,23 @@ static struct locale_entry *find_by_name
@@ -2417,6 +2421,23 @@ static struct locale_entry *find_by_name
return NULL;
}
@@ -35,7 +46,7 @@ $NetBSD: patch-main_stdtime_localtime.c,v 1.2 2015/05/19 07:52:14 jnemeth Exp $
static const char *store_by_locale(locale_t prevlocale)
{
struct locale_entry *cur;
@@ -2474,6 +2491,7 @@ const char *ast_setlocale(const char *lo
@@ -2474,6 +2495,7 @@ const char *ast_setlocale(const char *lo
AST_LIST_UNLOCK(&localelist);
return store_by_locale(prevlocale);
}
@@ -43,7 +54,7 @@ $NetBSD: patch-main_stdtime_localtime.c,v 1.2 2015/05/19 07:52:14 jnemeth Exp $
#else
const char *ast_setlocale(const char *unused)
{
@@ -2487,7 +2505,9 @@ int ast_strftime_locale(char *buf, size_
@@ -2487,7 +2509,9 @@ int ast_strftime_locale(char *buf, size_
char *format = ast_calloc(1, fmtlen), *fptr = format, *newfmt;
int decimals = -1, i, res;
long fraction;
@@ -53,7 +64,7 @@ $NetBSD: patch-main_stdtime_localtime.c,v 1.2 2015/05/19 07:52:14 jnemeth Exp $
buf[0] = '\0';/* Ensure the buffer is initialized. */
if (!format) {
@@ -2542,6 +2562,14 @@ defcase: *fptr++ = *tmp;
@@ -2542,6 +2566,14 @@ defcase: *fptr++ = *tmp;
}
*fptr = '\0';
#undef strftime
@@ -68,7 +79,7 @@ $NetBSD: patch-main_stdtime_localtime.c,v 1.2 2015/05/19 07:52:14 jnemeth Exp $
if (locale) {
prevlocale = ast_setlocale(locale);
}
@@ -2549,6 +2577,7 @@ defcase: *fptr++ = *tmp;
@@ -2549,6 +2581,7 @@ defcase: *fptr++ = *tmp;
if (locale) {
ast_setlocale(prevlocale);
}
@@ -76,7 +87,7 @@ $NetBSD: patch-main_stdtime_localtime.c,v 1.2 2015/05/19 07:52:14 jnemeth Exp $
ast_free(format);
return res;
}
@@ -2562,11 +2591,22 @@ char *ast_strptime_locale(const char *s,
@@ -2562,11 +2595,22 @@ char *ast_strptime_locale(const char *s,
{
struct tm tm2 = { 0, };
char *res;

View File

@@ -0,0 +1,27 @@
$NetBSD: patch-res_ael_pval.c,v 1.1 2016/07/23 08:27:44 jnemeth Exp $
--- res/ael/pval.c.orig 2016-07-21 14:56:56.000000000 +0000
+++ res/ael/pval.c
@@ -3344,6 +3344,9 @@ int contains_switch(pval *item)
return 0;
}
+RAII_DECL(char *, buf1, free);
+RAII_DECL(char *, buf2, free);
+RAII_DECL(char *, new_label, free);
static int gen_prios(struct ael_extension *exten, char *label, pval *statement, struct ael_extension *mother_exten, struct ast_context *this_context )
{
@@ -3356,9 +3359,9 @@ static int gen_prios(struct ael_extensio
#ifdef OLD_RAND_ACTION
struct ael_priority *rand_test, *rand_end, *rand_skip;
#endif
- RAII_VAR(char *, buf1, NULL, free);
- RAII_VAR(char *, buf2, NULL, free);
- RAII_VAR(char *, new_label, NULL, free);
+ RAII_VAR(char *, buf1, NULL);
+ RAII_VAR(char *, buf2, NULL);
+ RAII_VAR(char *, new_label, NULL);
char *strp, *strp2;
int default_exists;
int local_control_statement_count;

View File

@@ -0,0 +1,32 @@
$NetBSD: patch-res_pjproject_pjlib_include_pj_config.h,v 1.1 2015/10/27 08:49:01 jnemeth Exp $
--- res/pjproject/pjlib/include/pj/config.h.orig 2015-10-09 22:23:39.000000000 +0000
+++ res/pjproject/pjlib/include/pj/config.h
@@ -555,7 +555,7 @@
* the underlying implementation changes.
*/
#ifndef PJ_IOQUEUE_MAX_HANDLES
-# define PJ_IOQUEUE_MAX_HANDLES (64)
+# define PJ_IOQUEUE_MAX_HANDLES (1024)
#endif
@@ -622,16 +622,10 @@
/**
* Determine if FD_SETSIZE is changeable/set-able. If so, then we will
- * set it to PJ_IOQUEUE_MAX_HANDLES. Currently we detect this by checking
- * for Winsock.
+ * set it to PJ_IOQUEUE_MAX_HANDLES. Assumed to be supported by default.
*/
#ifndef PJ_FD_SETSIZE_SETABLE
-# if (defined(PJ_HAS_WINSOCK_H) && PJ_HAS_WINSOCK_H!=0) || \
- (defined(PJ_HAS_WINSOCK2_H) && PJ_HAS_WINSOCK2_H!=0)
-# define PJ_FD_SETSIZE_SETABLE 1
-# else
-# define PJ_FD_SETSIZE_SETABLE 0
-# endif
+# define PJ_FD_SETSIZE_SETABLE 1
#endif
/**

View File

@@ -0,0 +1,21 @@
$NetBSD: patch-res_pjproject_pjlib_include_pj_sock__select.h,v 1.1 2015/10/27 08:49:01 jnemeth Exp $
--- res/pjproject/pjlib/include/pj/sock_select.h.orig 2015-10-09 22:23:39.000000000 +0000
+++ res/pjproject/pjlib/include/pj/sock_select.h
@@ -25,6 +25,7 @@
* @brief Socket select().
*/
+#include <limits.h>
#include <pj/types.h>
PJ_BEGIN_DECL
@@ -55,7 +56,7 @@ PJ_BEGIN_DECL
*/
typedef struct pj_fd_set_t
{
- pj_sock_t data[PJ_IOQUEUE_MAX_HANDLES+ 4]; /**< Opaque buffer for fd_set */
+ pj_sock_t data[PJ_IOQUEUE_MAX_HANDLES / sizeof(pj_sock_t) / CHAR_BIT + 4]; /**< Opaque buffer for fd_set */
} pj_fd_set_t;

View File

@@ -0,0 +1,52 @@
$NetBSD: patch-res_pjproject_pjlib_src_pj_sock__select.c,v 1.1 2015/10/27 08:49:01 jnemeth Exp $
--- res/pjproject/pjlib/src/pj/sock_select.c.orig 2015-10-09 22:23:39.000000000 +0000
+++ res/pjproject/pjlib/src/pj/sock_select.c
@@ -40,10 +40,11 @@
#define PART_FDSET_OR_NULL(ps) (ps ? PART_FDSET(ps) : NULL)
#define PART_COUNT(ps) (ps->data[0])
+typedef char pj_assert_fd_set_t[(sizeof(pj_fd_set_t)-sizeof(pj_sock_t) >= sizeof(fd_set)) ? 1 : -1];
+
PJ_DEF(void) PJ_FD_ZERO(pj_fd_set_t *fdsetp)
{
PJ_CHECK_STACK();
- pj_assert(sizeof(pj_fd_set_t)-sizeof(pj_sock_t) >= sizeof(fd_set));
FD_ZERO(PART_FDSET(fdsetp));
PART_COUNT(fdsetp) = 0;
@@ -53,7 +54,6 @@ PJ_DEF(void) PJ_FD_ZERO(pj_fd_set_t *fds
PJ_DEF(void) PJ_FD_SET(pj_sock_t fd, pj_fd_set_t *fdsetp)
{
PJ_CHECK_STACK();
- pj_assert(sizeof(pj_fd_set_t)-sizeof(pj_sock_t) >= sizeof(fd_set));
if (!PJ_FD_ISSET(fd, fdsetp))
++PART_COUNT(fdsetp);
@@ -64,7 +64,6 @@ PJ_DEF(void) PJ_FD_SET(pj_sock_t fd, pj_
PJ_DEF(void) PJ_FD_CLR(pj_sock_t fd, pj_fd_set_t *fdsetp)
{
PJ_CHECK_STACK();
- pj_assert(sizeof(pj_fd_set_t)-sizeof(pj_sock_t) >= sizeof(fd_set));
if (PJ_FD_ISSET(fd, fdsetp))
--PART_COUNT(fdsetp);
@@ -75,8 +74,6 @@ PJ_DEF(void) PJ_FD_CLR(pj_sock_t fd, pj_
PJ_DEF(pj_bool_t) PJ_FD_ISSET(pj_sock_t fd, const pj_fd_set_t *fdsetp)
{
PJ_CHECK_STACK();
- PJ_ASSERT_RETURN(sizeof(pj_fd_set_t)-sizeof(pj_sock_t) >= sizeof(fd_set),
- 0);
return FD_ISSET(fd, PART_FDSET(fdsetp));
}
@@ -96,9 +93,6 @@ PJ_DEF(int) pj_sock_select( int n,
PJ_CHECK_STACK();
- PJ_ASSERT_RETURN(sizeof(pj_fd_set_t)-sizeof(pj_sock_t) >= sizeof(fd_set),
- PJ_EBUG);
-
if (timeout) {
os_timeout.tv_sec = timeout->sec;
os_timeout.tv_usec = timeout->msec * 1000;

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-res_pjproject_third__party_portaudio_src_hostapi_alsa_pa__linux__alsa.c,v 1.1 2015/10/27 08:49:01 jnemeth Exp $
--- res/pjproject/third_party/portaudio/src/hostapi/alsa/pa_linux_alsa.c.orig 2015-10-09 22:23:39.000000000 +0000
+++ res/pjproject/third_party/portaudio/src/hostapi/alsa/pa_linux_alsa.c
@@ -53,7 +53,7 @@
#undef ALSA_PCM_NEW_HW_PARAMS_API
#undef ALSA_PCM_NEW_SW_PARAMS_API
-#include <sys/poll.h>
+#include <poll.h>
#include <string.h> /* strlen() */
#include <limits.h>
#include <math.h>

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-res_pjproject_third__party_portaudio_src_hostapi_oss_pa__unix__oss.c,v 1.1 2015/10/27 08:49:01 jnemeth Exp $
--- res/pjproject/third_party/portaudio/src/hostapi/oss/pa_unix_oss.c.orig 2015-10-09 22:23:39.000000000 +0000
+++ res/pjproject/third_party/portaudio/src/hostapi/oss/pa_unix_oss.c
@@ -59,7 +59,7 @@
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <limits.h>
#include <semaphore.h>

View File

@@ -0,0 +1,431 @@
$NetBSD: patch-res_res__timing__kqueue.c,v 1.1 2015/10/27 08:49:01 jnemeth Exp $
--- res/res_timing_kqueue.c.orig 2015-10-09 22:23:39.000000000 +0000
+++ res/res_timing_kqueue.c
@@ -71,9 +71,12 @@ static struct ast_timing_interface kqueu
static struct ao2_container *kqueue_timers;
struct kqueue_timer {
+ intptr_t period;
int handle;
- uint64_t nsecs;
- uint64_t unacked;
+#ifndef EVFILT_USER
+ int continuous_fd;
+ unsigned int continuous_fd_valid:1;
+#endif
unsigned int is_continuous:1;
};
@@ -90,6 +93,78 @@ static int kqueue_timer_cmp(void *obj, v
return timer1->handle == timer2->handle ? CMP_MATCH | CMP_STOP : 0;
}
+#ifdef EVFILT_USER
+#define CONTINUOUS_EVFILT_TYPE EVFILT_USER
+static int kqueue_timer_init_continuous_event(struct kqueue_timer *timer)
+{
+ return 0;
+}
+
+static int kqueue_timer_enable_continuous_event(struct kqueue_timer *timer)
+{
+ struct kevent kev[2];
+
+ EV_SET(&kev[0], (uintptr_t)timer, EVFILT_USER, EV_ADD | EV_ENABLE,
+ 0, 0, NULL);
+ EV_SET(&kev[1], (uintptr_t)timer, EVFILT_USER, 0, NOTE_TRIGGER,
+ 0, NULL);
+ return kevent(timer->handle, kev, 2, NULL, 0, NULL);
+}
+
+static int kqueue_timer_disable_continuous_event(struct kqueue_timer *timer)
+{
+ struct kevent kev;
+
+ EV_SET(&kev, (uintptr_t)timer, EVFILT_USER, EV_DELETE, 0, 0, NULL);
+ return kevent(timer->handle, &kev, 1, NULL, 0, NULL);
+}
+
+static void kqueue_timer_fini_continuous_event(struct kqueue_timer *timer)
+{
+}
+
+#else /* EVFILT_USER */
+
+#define CONTINUOUS_EVFILT_TYPE EVFILT_READ
+static int kqueue_timer_init_continuous_event(struct kqueue_timer *timer)
+{
+ int pipefds[2];
+ int retval;
+
+ retval = pipe(pipefds);
+ if (retval == 0) {
+ timer->continuous_fd = pipefds[0];
+ timer->continuous_fd_valid = 1;
+ close(pipefds[1]);
+ }
+ return retval;
+}
+
+static void kqueue_timer_fini_continuous_event(struct kqueue_timer *timer)
+{
+ if (timer->continuous_fd_valid) {
+ close(timer->continuous_fd);
+ }
+}
+
+static int kqueue_timer_enable_continuous_event(struct kqueue_timer *timer)
+{
+ struct kevent kev;
+
+ EV_SET(&kev, timer->continuous_fd, EVFILT_READ, EV_ADD | EV_ENABLE,
+ 0, 0, NULL);
+ return kevent(timer->handle, &kev, 1, NULL, 0, NULL);
+}
+
+static int kqueue_timer_disable_continuous_event(struct kqueue_timer *timer)
+{
+ struct kevent kev;
+
+ EV_SET(&kev, timer->continuous_fd, EVFILT_READ, EV_DELETE, 0, 0, NULL);
+ return kevent(timer->handle, &kev, 1, NULL, 0, NULL);
+}
+#endif
+
static void timer_destroy(void *obj)
{
struct kqueue_timer *timer = obj;
@@ -120,15 +195,25 @@ static int kqueue_timer_open(void)
int handle;
if (!(timer = ao2_alloc(sizeof(*timer), timer_destroy))) {
- ast_log(LOG_ERROR, "Could not allocate memory for kqueue_timer structure\n");
+ ast_log(LOG_ERROR, "Alloc failed for kqueue_timer structure\n");
return -1;
}
+
if ((timer->handle = handle = kqueue()) < 0) {
- ast_log(LOG_ERROR, "Failed to create kqueue timer: %s\n", strerror(errno));
+ ast_log(LOG_ERROR, "Failed to create kqueue fd: %s\n",
+ strerror(errno));
ao2_ref(timer, -1);
return -1;
}
+ if (kqueue_timer_init_continuous_event(timer) != 0) {
+ ast_log(LOG_ERROR, "Failed to create continuous event: %s\n",
+ strerror(errno));
+ ao2_ref(timer, -1);
+ return -1;
+ }
+ ast_debug(5, "[%d]: Create timer\n", timer->handle);
+
ao2_link(kqueue_timers, timer);
/* Get rid of the reference from the allocation */
ao2_ref(timer, -1);
@@ -143,54 +228,86 @@ static void kqueue_timer_close(int handl
return;
}
+ ast_debug(5, "[%d]: Timer close\n", our_timer->handle);
ao2_unlink(kqueue_timers, our_timer);
ao2_ref(our_timer, -1);
}
-static void kqueue_set_nsecs(struct kqueue_timer *our_timer, uint64_t nsecs)
+/*
+ * Use the highest precision available that does not overflow
+ * the datatype kevent is using for time.
+ */
+static intptr_t kqueue_scale_period(unsigned int period_ns, int *units)
{
- struct timespec nowait = { 0, 1 };
-#ifdef HAVE_KEVENT64
- struct kevent64_s kev;
-
- EV_SET64(&kev, our_timer->handle, EVFILT_TIMER, EV_ADD | EV_ENABLE, NOTE_NSECONDS,
- nsecs, 0, 0, 0);
- kevent64(our_timer->handle, &kev, 1, NULL, 0, 0, &nowait);
-#else
- struct kevent kev;
-
- EV_SET(&kev, our_timer->handle, EVFILT_TIMER, EV_ADD | EV_ENABLE,
-#ifdef NOTE_NSECONDS
- nsecs <= 0xFFffFFff ? NOTE_NSECONDS :
-#endif
-#ifdef NOTE_USECONDS
- NOTE_USECONDS
-#else /* Milliseconds, if no constants are defined */
- 0
-#endif
- ,
+ uint64_t period = period_ns;
+ *units = 0;
#ifdef NOTE_NSECONDS
- nsecs <= 0xFFffFFff ? nsecs :
-#endif
+ if (period < INTPTR_MAX) {
+ *units = NOTE_NSECONDS;
+ } else {
#ifdef NOTE_USECONDS
- nsecs / 1000
-#else /* Milliseconds, if nothing else is defined */
- nsecs / 1000000
-#endif
- , NULL);
- kevent(our_timer->handle, &kev, 1, NULL, 0, &nowait);
+ period /= 1000;
+ if (period < INTPTR_MAX) {
+ *units = NOTE_USECONDS;
+ } else {
+ period /= 1000;
+#ifdef NOTE_MSECONDS
+ *units = NOTE_MSECONDS;
+#endif /* NOTE_MSECONDS */
+ }
+#else /* NOTE_USECONDS */
+ period /= 1000000;
+#ifdef NOTE_MSECONDS
+ *units = NOTE_MSECONDS;
+#endif /* NOTE_MSECONDS */
+#endif /* NOTE_USECONDS */
+ }
+#else /* NOTE_NSECONDS */
+ period /= 1000000;
#endif
+ if (period > INTPTR_MAX) {
+ period = INTPTR_MAX;
+ }
+ return period;
}
static int kqueue_timer_set_rate(int handle, unsigned int rate)
{
+ struct kevent kev;
struct kqueue_timer *our_timer;
+ uint64_t period_ns;
+ int flags;
+ int units;
+ int retval;
if (!(our_timer = lookup_timer(handle))) {
return -1;
}
- kqueue_set_nsecs(our_timer, (our_timer->nsecs = rate ? (long) (1000000000 / rate) : 0L));
+ if (rate == 0) {
+ if (our_timer->period == 0) {
+ ao2_ref(our_timer, -1);
+ return 0;
+ }
+ flags = EV_DELETE;
+ our_timer->period = 0;
+ units = 0;
+ } else {
+ flags = EV_ADD | EV_ENABLE;
+ period_ns = (uint64_t)1000000000 / rate;
+ our_timer->period = kqueue_scale_period(period_ns, &units);
+ }
+ ast_debug(5, "[%d]: Set rate %u:%ju\n",
+ our_timer->handle, units, (uintmax_t)our_timer->period);
+ EV_SET(&kev, our_timer->handle, EVFILT_TIMER, flags, units,
+ our_timer->period, NULL);
+ retval = kevent(our_timer->handle, &kev, 1, NULL, 0, NULL);
+
+ if (retval == -1) {
+ ast_log(LOG_ERROR, "[%d]: Error queueing timer: %s\n",
+ our_timer->handle, strerror(errno));
+ }
+
ao2_ref(our_timer, -1);
return 0;
@@ -198,75 +315,113 @@ static int kqueue_timer_set_rate(int han
static int kqueue_timer_ack(int handle, unsigned int quantity)
{
+ static struct timespec ts_nowait = { 0, 0 };
struct kqueue_timer *our_timer;
+ struct kevent kev[2];
+ int i, retval;
if (!(our_timer = lookup_timer(handle))) {
return -1;
}
- if (our_timer->unacked < quantity) {
- ast_debug(1, "Acking more events than have expired?!!\n");
- our_timer->unacked = 0;
+ retval = kevent(our_timer->handle, NULL, 0, kev, 2, &ts_nowait);
+ if (retval == -1) {
+ ast_log(LOG_ERROR, "[%d]: Error sampling kqueue: %s\n",
+ our_timer->handle, strerror(errno));
ao2_ref(our_timer, -1);
return -1;
- } else {
- our_timer->unacked -= quantity;
+ }
+
+ for (i = 0; i < retval; i++) {
+ switch (kev[i].filter) {
+ case EVFILT_TIMER:
+ if (kev[i].data > quantity) {
+ ast_log(LOG_ERROR, "[%d]: Missed %ju\n",
+ our_timer->handle,
+ (uintmax_t)kev[i].data - quantity);
+ }
+ break;
+ case CONTINUOUS_EVFILT_TYPE:
+ if (!our_timer->is_continuous) {
+ ast_log(LOG_ERROR,
+ "[%d]: Spurious user event\n",
+ our_timer->handle);
+ }
+ break;
+ default:
+ ast_log(LOG_ERROR, "[%d]: Spurious kevent type %d.\n",
+ our_timer->handle, kev[i].filter);
+ }
}
ao2_ref(our_timer, -1);
+
return 0;
}
static int kqueue_timer_enable_continuous(int handle)
{
struct kqueue_timer *our_timer;
+ int retval;
if (!(our_timer = lookup_timer(handle))) {
return -1;
}
- kqueue_set_nsecs(our_timer, 1);
- our_timer->is_continuous = 1;
- our_timer->unacked = 0;
+ if (!our_timer->is_continuous) {
+ ast_debug(5, "[%d]: Enable continuous\n", our_timer->handle);
+ retval = kqueue_timer_enable_continuous_event(our_timer);
+ if (retval == -1) {
+ ast_log(LOG_ERROR,
+ "[%d]: Error signalling continuous event: %s\n",
+ our_timer->handle, strerror(errno));
+ }
+ our_timer->is_continuous = 1;
+ }
+
ao2_ref(our_timer, -1);
+
return 0;
}
static int kqueue_timer_disable_continuous(int handle)
{
struct kqueue_timer *our_timer;
+ int retval;
if (!(our_timer = lookup_timer(handle))) {
return -1;
}
- kqueue_set_nsecs(our_timer, our_timer->nsecs);
- our_timer->is_continuous = 0;
- our_timer->unacked = 0;
+ if (our_timer->is_continuous) {
+ ast_debug(5, "[%d]: Disable Continuous\n", our_timer->handle);
+ retval = kqueue_timer_disable_continuous_event(our_timer);
+ if (retval == -1) {
+ ast_log(LOG_ERROR,
+ "[%d]: Error clearing continuous event: %s\n",
+ our_timer->handle, strerror(errno));
+ }
+ our_timer->is_continuous = 0;
+ }
+
ao2_ref(our_timer, -1);
+
return 0;
}
static enum ast_timer_event kqueue_timer_get_event(int handle)
{
- enum ast_timer_event res = -1;
struct kqueue_timer *our_timer;
- struct timespec sixty_seconds = { 60, 0 };
- struct kevent kev;
+ enum ast_timer_event res;
if (!(our_timer = lookup_timer(handle))) {
- return -1;
+ return AST_TIMING_EVENT_EXPIRED;
}
- /* If we have non-ACKed events, just return immediately */
- if (our_timer->unacked == 0) {
- if (kevent(handle, NULL, 0, &kev, 1, &sixty_seconds) > 0) {
- our_timer->unacked += kev.data;
- }
- }
-
- if (our_timer->unacked > 0) {
- res = our_timer->is_continuous ? AST_TIMING_EVENT_CONTINUOUS : AST_TIMING_EVENT_EXPIRED;
+ if (our_timer->is_continuous) {
+ res = AST_TIMING_EVENT_CONTINUOUS;
+ } else {
+ res = AST_TIMING_EVENT_EXPIRED;
}
ao2_ref(our_timer, -1);
@@ -275,8 +430,7 @@ static enum ast_timer_event kqueue_timer
static unsigned int kqueue_timer_get_max_rate(int handle)
{
- /* Actually, the max rate is 2^64-1 seconds, but that's not representable in a 32-bit integer. */
- return UINT_MAX;
+ return INTPTR_MAX > UINT_MAX ? UINT_MAX : INTPTR_MAX;
}
#ifdef TEST_FRAMEWORK
@@ -331,13 +485,12 @@ AST_TEST_DEFINE(test_kqueue_timing)
res = AST_TEST_FAIL;
break;
}
-#if 0
- if (kt->unacked == 0) {
- ast_test_status_update(test, "Unacked events is 0, but there should be at least 1.\n");
- res = AST_TEST_FAIL;
+ if (kqueue_timer_ack(handle, 1) != 0) {
+ ast_test_status_update(test, "Acking event failed.\n");
+ res = AST_TEST_FAiL;
break;
}
-#endif
+
kqueue_timer_enable_continuous(handle);
start = ast_tvnow();
for (i = 0; i < 100; i++) {
@@ -351,15 +504,15 @@ AST_TEST_DEFINE(test_kqueue_timing)
res = AST_TEST_FAIL;
break;
}
+ if (kqueue_timer_ack(handle, 1) != 0) {
+ ast_test_status_update(test, "Acking event failed.\n");
+ res = AST_TEST_FAIL;
+ }
+
}
+
diff = ast_tvdiff_us(ast_tvnow(), start);
ast_test_status_update(test, "diff is %llu\n", diff);
- /*
- if (abs(diff - kt->unacked) == 0) {
- ast_test_status_update(test, "Unacked events should be around 1000, not %llu\n", kt->unacked);
- res = AST_TEST_FAIL;
- }
- */
} while (0);
kqueue_timer_close(handle);
return res;

19
comms/asterisk13/DESCR Normal file
View File

@@ -0,0 +1,19 @@
Asterisk is a complete PBX in software. It provides all of the
features you would expect from a PBX and more. Asterisk does voice
over IP in three protocols, and can interoperate with almost all
standards-based telephony equipment using relatively inexpensive
hardware.
Asterisk provides Voicemail services with Directory, Call Conferencing,
Interactive Voice Response, Call Queuing. It has support for
three-way calling, caller ID services, ADSI, SIP and H.323 (as both
client and gateway).
This is a long term support version. It is scheduled to go to
security fixes only on October 24th, 2018, and EOL on October 24th,
2019. See here for more information about Asterisk versions:
https://wiki.asterisk.org/wiki/display/AST/Asterisk+Versions
NOTE: This version does not work with the zaptel drivers. It
requires the newer DAHDI drivers which are still being ported.
So, there is no hardware support available at this moment.

275
comms/asterisk13/Makefile Normal file
View File

@@ -0,0 +1,275 @@
# $NetBSD: Makefile,v 1.12 2016/09/23 17:50:19 jnemeth Exp $
#
# NOTE: when updating this package, there are two places that sound
# tarballs need to be checked; look in ${WRKSRC}/sounds/Makefile
# to find out the current sound file versions
DISTNAME= asterisk-13.11.2
CATEGORIES= comms net audio
MASTER_SITES= http://downloads.asterisk.org/pub/telephony/asterisk/ \
http://downloads.asterisk.org/pub/telephony/asterisk/old-releases/ \
http://downloads.asterisk.org/pub/telephony/sounds/releases/
DIST_SUBDIR= ${PKGNAME_NOREV}
DISTFILES= ${DEFAULT_DISTFILES}
COMMENT= The Asterisk Software PBX
LICENSE= gnu-gpl-v2
EXTRACT_ONLY= ${DISTNAME}.tar.gz
OWNER= jnemeth@NetBSD.org
HOMEPAGE= http://www.asterisk.org/
MAKE_JOBS_SAFE= NO
# known to have issues on i386, block the package until the bug is fixed
BROKEN_ON_PLATFORM= NetBSD-*-i386
CONFLICTS+= asterisk-sounds-extra-[0-9]*
.include "../../mk/bsd.prefs.mk"
USE_TOOLS+= bison gmake perl:run pkg-config tar bash:run
USE_LANGUAGES= c c++
REPLACE_BASH+= contrib/scripts/astversion
REPLACE_PERL+= agi/DialAnMp3.agi agi/agi-test.agi
REPLACE_PERL+= agi/fastagi-test agi/jukebox.agi agi/numeralize
REPLACE_PERL+= contrib/scripts/vmail.cgi
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --datarootdir=${PREFIX}/libdata
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
CONFIGURE_ARGS+= --without-gtk2
# XXX remove when lang/lua gets builtin.mk
CONFIGURE_ARGS+= --without-lua
.if (${OPSYS} == "NetBSD" && \
(empty(OS_VERSION:M6.99.[4-9]?) && empty(OS_VERSION:M[7-9].*)))
CONFIGURE_ARGS+= --without-srtp
.else
CONFIGURE_ARGS+= --with-srtp
PLIST.srtp= YES
.include "../../comms/srtp/buildlink3.mk"
.endif
INSTALL_TARGET= install samples
INSTALLATION_DIRS+= lib/pkgconfig share/doc/${PKGBASE}
INSTALLATION_DIRS+= share/examples/asterisk share/examples/rc.d
INSTALLATION_DIRS+= ${ASTDATADIR}/sounds/en ${ASTDATADIR}/moh
BUILD_DEFS+= VARBASE
ASTERISK_USER?= asterisk
ASTERISK_GROUP?= asterisk
PKG_GROUPS= ${ASTERISK_GROUP}
PKG_USERS= ${ASTERISK_USER}:${ASTERISK_GROUP}
PKG_GECOS.${ASTERISK_USER}= Asterisk PBX
PKG_GROUPS_VARS= ASTERISK_GROUP
PKG_USERS_VARS= ASTERISK_USER
FILES_SUBST+= ASTERISK_USER=${ASTERISK_USER}
FILES_SUBST+= ASTERISK_GROUP=${ASTERISK_GROUP}
MESSAGE_SUBST+= ASTERISK_USER=${ASTERISK_USER}
MESSAGE_SUBST+= ASTERISK_GROUP=${ASTERISK_GROUP}
# Various path settings for Asterisk
PKG_SYSCONFSUBDIR= asterisk
PKG_SYSCONFDIR_PERMS= ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
ASTETCDIR= ${PKG_SYSCONFDIR}
ASTEXAMPLEDIR= ${PREFIX}/share/examples/asterisk
ASTDBDIR= ${VARBASE}/db/asterisk
ASTSPOOLDIR= ${VARBASE}/spool/asterisk
ASTLOGDIR= ${VARBASE}/log/asterisk
MESSAGE_SUBST+= ASTDBDIR=${ASTDBDIR}
MESSAGE_SUBST+= ASTSPOOLDIR=${ASTSPOOLDIR}
MESSAGE_SUBST+= ASTLOGDIR=${ASTLOGDIR}
ASTVARRUNDIR= ${VARBASE}/run/asterisk
FILES_SUBST+= ASTVARRUNDIR=${ASTVARRUNDIR}
ASTDATADIR= ${PREFIX}/libdata/asterisk
MAKE_FLAGS+= ASTLIBDIR=${PREFIX}/lib/asterisk
MAKE_FLAGS+= ASTVARLIBDIR=${ASTDATADIR}
MAKE_FLAGS+= ASTKEYDIR=${ASTDATADIR}
MAKE_FLAGS+= ASTDATADIR=${ASTDATADIR}
MAKE_FLAGS+= ASTSPOOLDIR=${ASTSPOOLDIR}
MAKE_FLAGS+= ASTLOGDIR=${ASTLOGDIR}
MAKE_FLAGS+= ASTHEADERDIR=${PREFIX}/include/asterisk
MAKE_FLAGS+= ASTCONFPATH=${ASTETCDIR}/asterisk.conf
MAKE_FLAGS+= ASTBINDIR=${PREFIX}/bin
MAKE_FLAGS+= ASTSBINDIR=${PREFIX}/sbin
MAKE_FLAGS+= ASTVARRUNDIR=${ASTVARRUNDIR}
MAKE_FLAGS+= ASTMANDIR=${PREFIX}/${PKGMANDIR}
MAKE_FLAGS+= ASTETCDIR=${ASTETCDIR}
MAKE_FLAGS+= ASTDBDIR=${ASTDBDIR}
MAKE_FLAGS+= AGI_DIR=${PREFIX}/libexec/agi-bin
MAKE_FLAGS+= ASTEXAMPLEDIR=${ASTEXAMPLEDIR}
MAKE_FLAGS+= WRKSRC=${WRKSRC}
MAKE_FLAGS+= LDOPTS=${LDFLAGS:M*:Q}
MAKE_FLAGS+= HTTP_DOCSDIR=${PREFIX}/share/httpd/htdocs
MAKE_FLAGS+= HTTP_CGIDIR=${PREFIX}/libexec/cgi-bin
MAKE_FLAGS+= OPTIMIZE=-O3
.if !empty(MACHINE_PLATFORM:MSunOS-*-i386)
BUILDLINK_TRANSFORM+= rm:-march=i386
.endif
PLIST_VARS+= kqueue
.if exists(/usr/include/sys/event.h)
PLIST.kqueue= yes
.endif
PLIST_VARS+= mgcp
# NOSIGPIPE is a temp variable, since PLIST.mgcp MUST remain undefined
# if the grep fails
NOSIGPIPE!= ${GREP} SO_NOSIGPIPE /usr/include/sys/socket.h || echo ""
.if ${NOSIGPIPE} != ""
PLIST.mgcp= yes
.endif
.include "options.mk"
# check sounds/Makefile for current version when upgrading package
DISTFILES+= asterisk-extra-sounds-en-gsm-1.5.tar.gz
# Override default paths in config files
SUBST_CLASSES+= configs
SUBST_STAGE.configs= pre-configure
SUBST_FILES.configs= configs/samples/cli_aliases.conf.sample
SUBST_FILES.configs+= configs/samples/festival.conf.sample
SUBST_FILES.configs+= configs/samples/http.conf.sample
SUBST_FILES.configs+= configs/samples/iax.conf.sample
SUBST_FILES.configs+= configs/samples/musiconhold.conf.sample
SUBST_FILES.configs+= configs/samples/osp.conf.sample
SUBST_FILES.configs+= configs/samples/phoneprov.conf.sample
SUBST_FILES.configs+= configs/samples/res_config_sqlite.conf.sample
SUBST_FILES.configs+= configs/samples/sla.conf.sample
SUBST_SED.configs+= -e 's|doc/|${PREFIX}/share/doc/${PKGBASE}/|'
SUBST_SED.configs+= -e 's|/etc/asterisk|${ASTETCDIR}|'
SUBST_SED.configs+= -e 's|/var/lib/asterisk|${ASTVARLIBDIR}|'
SUBST_SED.configs+= -e "s|/usr/local/man|${ASTMANDIR}|"
SUBST_SED.configs+= -e "s|/usr/local|${PREFIX}|"
SUBST_SED.configs+= -e "s|/var|${VARBASE}|"
# XXX gross hack, remove when item is fixed
SUBST_CLASSES.NetBSD+= autoconfig
SUBST_STAGE.autoconfig= post-configure
SUBST_FILES.autoconfig= include/asterisk/autoconfig.h
SUBST_SED.autoconfig= -e "s|^\#define HAVE_GCC_ATOMICS 1|\#undef HAVE_GCC_ATOMICS|"
SUBST_SED.autoconfig+= -e "s|^\#define HAVE_GETHOSTBYNAME_R_6 1|\#undef HAVE_GETHOSTBYNAME_R_6|"
# XXX gross hack, IP_PKTINFO in NetBSD isn't compatible with anything else
SUBST_CLASSES.NetBSD+= pktinfo
SUBST_STAGE.pktinfo= post-configure
SUBST_FILES.pktinfo= include/asterisk/autoconfig.h
SUBST_SED.pktinfo= -e "s|^\#define HAVE_PKTINFO 1|\#undef HAVE_PKTINFO|"
# XXX gross hack, gethostbyname_r on NETBSD is for internal use only
SUBST_CLASSES.NetBSD+= gethostbyname_r
SUBST_STAGE.gethostbyname_r= post-configure
SUBST_FILES.gethostbyname_r= include/asterisk/autoconfig.h
SUBST_SED.gethostbyname_r= -e "s|^\#define HAVE_GETHOSTBYNAME_R_5 1|\#undef HAVE_GETHOSTBYNAME_R_5|"
SUBST_SED.gethostbyname_r+= -e "s|^\#define HAVE_GETHOSTBYNAME_R_6 1|\#undef HAVE_GETHOSTBYNAME_R_6|"
RCD_SCRIPTS= asterisk
OWN_DIRS_PERMS+= ${ASTDBDIR} ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTSPOOLDIR} ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/dictate ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/meetme ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/monitor ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/outgoing ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/system ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/tmp ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/voicemail ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/voicemail/default ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/voicemail/default/1234 ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/voicemail/default/1234/INBOX ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/voicemail/default/1234/en ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
SPECIAL_PERMS+= ${ASTSPOOLDIR}/voicemail/default/1234/en/busy.gsm ${ASTERISK_USER} ${ASTERISK_GROUP} 0644
SPECIAL_PERMS+= ${ASTSPOOLDIR}/voicemail/default/1234/en/unavail.gsm ${ASTERISK_USER} ${ASTERISK_GROUP} 0644
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/voicemail/default/INBOX ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/voicemail/default/en ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTLOGDIR} ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTLOGDIR}/cdr-csv ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTLOGDIR}/cdr-custom ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
CONF_FILES_PERMS= # empty
.for f in asterisk.conf extensions.conf
CONF_FILES_PERMS+= ${ASTEXAMPLEDIR}/${f:Q} ${PKG_SYSCONFDIR}/${f:Q} ${ASTERISK_USER} ${ASTERISK_GROUP} 0644
.endfor
.if !empty(PKG_OPTIONS:Masterisk-config)
# if we put all the files in $CONF_FILES, the message is _way_ too long.
. for f in acl.conf adsi.conf agents.conf alarmreceiver.conf alsa.conf \
amd.conf app_mysql.conf app_skel.conf ari.conf asterisk.adsi \
calendar.conf ccss.conf cdr.conf cdr_adaptive_odbc.conf \
cdr_custom.conf cdr_manager.conf cdr_mysql.conf cdr_odbc.conf \
cdr_pgsql.conf cdr_sqlite3_custom.conf cdr_syslog.conf \
cdr_tds.conf cel.conf cel_custom.conf cel_odbc.conf \
cel_pgsql.conf cel_sqlite3_custom.conf cel_tds.conf \
chan_dahdi.conf chan_mobile.conf cli.conf cli_aliases.conf \
cli_permissions.conf codecs.conf confbridge.conf console.conf \
dbsep.conf dnsmgr.conf dsp.conf dundi.conf enum.conf \
extconfig.conf extensions.ael extensions.conf extensions.lua \
extensions_minivm.conf features.conf festival.conf \
followme.conf func_odbc.conf hep.conf http.conf iax.conf \
iaxprov.conf indications.conf logger.conf manager.conf \
meetme.conf mgcp.conf minivm.conf misdn.conf modules.conf \
motif.conf musiconhold.conf muted.conf ooh323.conf osp.conf \
oss.conf phone.conf phoneprov.conf pjproject.conf pjsip.conf \
pjsip_notify.conf pjsip_wizard.conf queuerules.conf queues.conf \
res_config_mysql.conf res_config_sqlite.conf \
res_config_sqlite3.conf res_corosync.conf res_curl.conf \
res_fax.conf res_ldap.conf res_odbc.conf res_parking.conf \
res_pgsql.conf res_pktccops.conf res_snmp.conf \
res_stun_monitor.conf rtp.conf say.conf sip.conf \
sip_notify.conf skinny.conf sla.conf smdi.conf sorcery.conf \
ss7.timers stasis.conf statsd.conf telcordia-1.adsi udptl.conf \
unistim.conf users.conf voicemail.conf vpb.conf xmpp.conf
CONF_FILES_PERMS+= ${ASTEXAMPLEDIR}/${f:Q} ${PKG_SYSCONFDIR}/${f:Q} ${ASTERISK_USER} ${ASTERISK_GROUP} 0644
. endfor
.endif
PTHREAD_OPTS+= require native
.if (${OPSYS} == "Darwin" && exists(/usr/include/sys/poll.h))
post-patch:
${ECHO} "#include <sys/poll.h>" > ${WRKSRC}/include/asterisk/poll-compat.h
.endif
post-install:
# check sounds directory for current versions when upgrading package
${TAR} xzf ${WRKSRC}/sounds/asterisk-core-sounds-en-gsm-1.5.tar.gz -C ${DESTDIR}${ASTDATADIR}/sounds/en
${TAR} xzf ${WRKSRC}/sounds/asterisk-moh-opsound-wav-2.03.tar.gz -C ${DESTDIR}${ASTDATADIR}/moh
${TAR} xzf ${DISTDIR}/${DIST_SUBDIR}/asterisk-extra-sounds-en-gsm-1.5.tar.gz -C ${DESTDIR}${ASTDATADIR}/sounds/en
${INSTALL_DATA} ${WRKSRC}/BUGS ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/CHANGES ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/COPYING ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/CREDITS ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/ChangeLog ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/LICENSE ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/README ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/README-SERIOUSLY.bestpractices.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/UPGRADE-1.2.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/UPGRADE-1.4.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/UPGRADE-1.6.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/UPGRADE-1.8.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/UPGRADE-10.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/UPGRADE-11.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/UPGRADE-12.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/UPGRADE.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/Zaptel-to-DAHDI.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/doc/Asterisk-13-Reference.pdf ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/doc/Asterisk-Admin-Guide.pdf ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/doc/IAX2-security.pdf ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/doc/IAX2-security.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/doc/README.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/doc/api-1.6.2-changes.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
cp -r ${WRKSRC}/doc/Asterisk-Admin-Guide ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}/Asterisk-Admin-Guide
.include "../../databases/sqlite3/buildlink3.mk"
.include "../../devel/libuuid/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../textproc/jansson/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"
.include "../../textproc/libxml2/buildlink3.mk"
.include "../../www/curl/buildlink3.mk"
.include "../../mk/curses.buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

3345
comms/asterisk13/PLIST Normal file

File diff suppressed because it is too large Load Diff

60
comms/asterisk13/distinfo Normal file
View File

@@ -0,0 +1,60 @@
$NetBSD: distinfo,v 1.7 2016/09/23 17:50:19 jnemeth Exp $
SHA1 (asterisk-13.11.2/asterisk-13.11.2.tar.gz) = 92fafbb66ea471f5b2d3119d8e8a3f8eda7ed965
RMD160 (asterisk-13.11.2/asterisk-13.11.2.tar.gz) = beda826c24f93713716aafeca4bce64c2e13c20d
SHA512 (asterisk-13.11.2/asterisk-13.11.2.tar.gz) = c0275d353ab19de37ddd7b026ca5c920cf2a9fa578396e6af9a170e8dd8abf51875beacb103aaa1f9829d12efadd7ab7fd608e311f7f8b855a451073fe7197e9
Size (asterisk-13.11.2/asterisk-13.11.2.tar.gz) = 32630702 bytes
SHA1 (asterisk-13.11.2/asterisk-extra-sounds-en-gsm-1.5.tar.gz) = 831ae6442e23cbef1e7d1c84798778ad0b0524d1
RMD160 (asterisk-13.11.2/asterisk-extra-sounds-en-gsm-1.5.tar.gz) = d52df795201c53fc4cd7d99ed41516e312f6f0f3
SHA512 (asterisk-13.11.2/asterisk-extra-sounds-en-gsm-1.5.tar.gz) = c7d3c3fd2c854e6776801312d34bf69bbed78a443c16121637f508c5275f18b1d415cbb6e4f6f8c5aa3769cbbfa1a11485b9972053777f3ac39256c2c81729f1
Size (asterisk-13.11.2/asterisk-extra-sounds-en-gsm-1.5.tar.gz) = 4256538 bytes
SHA1 (patch-Makefile) = 1373ea4cfab46f701cef0f5c61a6a1604e710bf5
SHA1 (patch-addons_chan__ooh323.c) = 9cba619ced6a4449604faebeac33d91a23519c48
SHA1 (patch-apps_app__dumpchan.c) = 127ac02bdc180ad2334cd095aa6e646feb6fba10
SHA1 (patch-apps_app__followme.c) = c6a5790b5e9b34d07dbfdd66a58e2854c8c72695
SHA1 (patch-apps_app__queue.c) = c90dcacf1b18dba977b6a18505b9c1401a6c8e82
SHA1 (patch-apps_app__sms.c) = ae81daf6ccf8c8fdf2251dba305e137bb9ab6b05
SHA1 (patch-apps_app__voicemail.c) = ee46ffd64a15ef79fc568edd3d5eb68cd86865f7
SHA1 (patch-build__tools_mkpkgconfig) = 7fab8fcf46d9f8a3b98455674fec6307ec472b23
SHA1 (patch-cdr_cdr__pgsql.c) = 02dc677126a8fb00b30f7f073a60b68942281dfe
SHA1 (patch-cel_cel__pgsql.c) = b280efab2b035ce60be268bac9bc8824910b2b8f
SHA1 (patch-channels_chan__oss.c) = 8a1c32462097f4a58f48a1a994aff5a8ab4c9fb2
SHA1 (patch-channels_chan__sip.c) = a4abe1dcdec3db719a7fd0e5dbefb9c12f6a37db
SHA1 (patch-codecs_codec__dahdi.c) = 77d43907df17b0c1eeb0a1e9e95811c7ef7ae624
SHA1 (patch-configure) = 53e5ea06ba9796eb6621193364b1131e895944a1
SHA1 (patch-configure.ac) = fa68fb905ceb8d1ee399d01f60ae70c4b11e77e0
SHA1 (patch-contrib_scripts_vmail.cgi) = 672827eedf315a82a289c82d1ae8b935166e9319
SHA1 (patch-funcs_func__env.c) = 0faf9eafe2a5f1701924973a54d0ab49ba62a3b3
SHA1 (patch-include_asterisk_autoconfig.h.in) = 94de39b7eed7d51ae676415ccaadfdee0cdc4d23
SHA1 (patch-include_asterisk_endian.h) = 1fc20d750da7d0a0407c1e1694b8bb21753acdcd
SHA1 (patch-include_asterisk_lock.h) = ce636ef6102a2a95600cfc8215305507e08fe8f9
SHA1 (patch-include_asterisk_sha1.h) = 9b233ef82b50b8d94177616e1382991656ce1ebf
SHA1 (patch-include_asterisk_strings.h) = d204488d681e39af6fadf9f054c9e402f4cb8657
SHA1 (patch-main_Makefile) = 7a4449ca3d8a33adc640436fade268285c7e2191
SHA1 (patch-main_acl.c) = 06a9d247b19d648e9ff54ac2a234dc8ac8c023bb
SHA1 (patch-main_asterisk.c) = 93ae4e31b4ae279e42b5c3661bb5fdb76d9ea161
SHA1 (patch-main_astmm.c) = 26a98d6fbb567ae619041ebd01a31349a847deab
SHA1 (patch-main_cdr.c) = 540fbdb354aba100fa37392b879b92a85d1d8620
SHA1 (patch-main_cel.c) = 22fa21db8e0afa0958d34014f52e2c4fe9c73ba2
SHA1 (patch-main_http.c) = b36f1f3f0da25456a17888d34ea2bf7b61c1acf4
SHA1 (patch-main_logger.c) = 321a52b3015af85ea13055953cec5a5d9da05ec8
SHA1 (patch-main_manager.c) = 2e50ec3af30792fd87bf5253a0d99a03f2892957
SHA1 (patch-main_netsock.c) = 383952a5fd4e1cecf7d1fa304a897d72e52cdf8c
SHA1 (patch-main_pbx.c) = 8e7ced268edb29238f96418e8b21456364c4ae1f
SHA1 (patch-main_pbx__builtins.c) = fbe673500404438f4c38c1dd45dbadb04c88cf99
SHA1 (patch-main_sched.c) = 5fb08c75cb97398f4dd39cc2dd317190ca472f6c
SHA1 (patch-main_stdtime_localtime.c) = 58910ae9012915d69b31db9b0b41b3f85ce34e36
SHA1 (patch-main_test.c) = f38b370cdb5788304e02c71ef05d2130ead9de98
SHA1 (patch-main_utils.c) = 4b4de6303e8b937fe591a64efcf4d65ef8c56b97
SHA1 (patch-pbx_pbx__dundi.c) = 1bc28ff2412da569f139f245c5223845a2f6cebe
SHA1 (patch-res_res__calendar.c) = 45211a3baf8fbd8b201ba0167f8c56fb35728c4a
SHA1 (patch-res_res__calendar__caldav.c) = afe2f4806dd57148dde11baeefaa7897fce4d485
SHA1 (patch-res_res__calendar__icalendar.c) = ed34b7147d8834ebadac9b1b8488a4c645f90a5b
SHA1 (patch-sounds_Makefile) = 57cff080350c828526a276f44665ce11e2b93865
SHA1 (patch-tests_test__locale.c) = f3f1edc86356f2a7b4d3493433c772e164c77f66
SHA1 (patch-tests_test__voicemail__api.c) = c600f726136581e47cf34da2c0bb485b8a5912eb
SHA1 (patch-utils_Makefile) = ea70e9844624b37491570c58ba193d3ce3c23c77
SHA1 (patch-utils_db1-ast_include_db.h) = 03b43353b7967f999ace3eb160828c530e2e8fae
SHA1 (patch-utils_extconf.c) = f35d079c4801fe20132ff52d63d951d9e1658902
SHA1 (patch-utils_smsq.c) = 5c4cd729f1c9cb68291c514a2e54418e9b5a47cb
SHA1 (patch-utils_streamplayer.c) = a5bbff91d87f017143c57ae39d4fac5cda20f584

View File

@@ -0,0 +1,43 @@
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: asterisk.sh,v 1.1.1.1 2015/12/05 23:29:09 jnemeth Exp $
#
# PROVIDE: asterisk
# REQUIRE: DAEMON
# KEYWORD: shutdown
#
# You will need to set some variables in /etc/rc.conf to start Asterisk:
#
# asterisk=YES
if [ -f /etc/rc.subr ]
then
. /etc/rc.subr
fi
name="asterisk"
rcvar=$name
command="@PREFIX@/sbin/asterisk"
pidfile=@ASTVARRUNDIR@/${name}.pid
required_files="@PKG_SYSCONFDIR@/asterisk.conf"
extra_commands="reload"
start_precmd=asterisk_prestart
auser="@ASTERISK_USER@"
agroup="@ASTERISK_GROUP@"
command_args="-U $auser -G $agroup -n"
asterisk_prestart() {
if test ! -d @ASTVARRUNDIR@; then
mkdir @ASTVARRUNDIR@
fi
chown $auser:$agroup @ASTVARRUNDIR@
chmod 0755 @ASTVARRUNDIR@
}
stop_cmd="$command -nr -x 'core stop gracefully' >/dev/null"
reload_cmd="$command -nr -x 'core reload' >/dev/null"
asterisk_nice="-20"
load_rc_config $name
run_rc_command "$1"

View File

@@ -0,0 +1,34 @@
<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<service_bundle type="manifest" name="export">
<service name="@SMF_PREFIX@/@SMF_NAME@" type="service" version="1">
<create_default_instance enabled="false" />
<single_instance />
<dependency name='network' grouping='require_all' restart_on='error' type='service'>
<service_fmri value='svc:/milestone/network:default' />
</dependency>
<dependency name='filesystem-local' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local:default' />
</dependency>
<method_context>
<method_environment>
<envvar name="LD_PRELOAD_32" value="/usr/lib/extendedFILE.so.1" />
</method_environment>
</method_context>
<exec_method type="method" name="start" exec="@PREFIX@/sbin/asterisk" timeout_seconds="60" />
<exec_method type="method" name="stop" exec="@PREFIX@/sbin/asterisk -nr -x 'core stop gracefully' >/dev/null" timeout_seconds="60" />
<exec_method type="method" name="refresh" exec="@PREFIX@/sbin/asterisk -nr -x 'core reload' >/dev/null" timeout_seconds="60" />
<property_group name="startd" type="framework">
<propval name="duration" type="astring" value="contract" />
<propval name="ignore_error" type="astring" value="core,signal" />
</property_group>
<property_group name="application" type="application">
<propval name="config_file" type="astring" value="@PKG_SYSCONFDIR@/asterisk.conf" />
</property_group>
<template>
<common_name>
<loctext xml:lang="C">Asterisk PBX</loctext>
</common_name>
</template>
</service>
</service_bundle>

123
comms/asterisk13/options.mk Normal file
View File

@@ -0,0 +1,123 @@
# $NetBSD: options.mk,v 1.2 2015/12/05 23:42:44 jnemeth Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.asterisk
PKG_SUPPORTED_OPTIONS= zaptel x11 unixodbc ilbc webvmail ldap spandsp
PKG_SUPPORTED_OPTIONS+= jabber speex snmp pgsql asterisk-config
PKG_OPTIONS_LEGACY_OPTS+= gtk:x11
PKG_SUGGESTED_OPTIONS= ldap jabber speex asterisk-config
.include "../../mk/bsd.options.mk"
PLIST_VARS+= zaptel x11 unixodbc webvmail ldap spandsp jabber
PLIST_VARS+= speex snmp pgsql srtp
# Asterisk now uses DAHDI, not zaptel; not implemented yet...
#.if !empty(PKG_OPTIONS:Mzaptel)
## zaptel only supported under NetBSD at the moment
#. include "../../comms/zaptel-netbsd/buildlink3.mk"
#PLIST.zaptel= yes
#.else
#MAKE_FLAGS+= WITHOUT_ZAPTEL=1
#.endif
# gtkconsole depends on GTK 2.x
.if !empty(PKG_OPTIONS:Mx11)
. include "../../x11/gtk2/buildlink3.mk"
. include "../../devel/SDL/buildlink3.mk"
CONFIGURE_ARGS+= --with-sdl
CONFIGURE_ARGS+= --with-gtk2
PLIST.x11= yes
.else
CONFIGURE_ARGS+= --without-sdl
CONFIGURE_ARGS+= --without-gtk2
.endif
.if !empty(PKG_OPTIONS:Munixodbc)
. include "../../databases/unixodbc/buildlink3.mk"
. include "../../devel/libltdl/buildlink3.mk"
CONFIGURE_ARGS+= --with-ltdl
CONFIGURE_ARGS+= --with-unixodbc
PLIST.unixodbc= yes
.else
CONFIGURE_ARGS+= --without-ltdl
CONFIGURE_ARGS+= --without-unixodbc
.endif
.if !empty(PKG_OPTIONS:Mspandsp)
. include "../../comms/spandsp/buildlink3.mk"
CONFIGURE_ARGS+= --with-spandsp
PLIST.spandsp= yes
.else
CONFIGURE_ARGS+= --without-spandsp
.endif
.if !empty(PKG_OPTIONS:Mjabber)
. include "../../textproc/iksemel/buildlink3.mk"
CONFIGURE_ARGS+= --with-iksemel=${PREFIX}
PLIST.jabber= yes
.else
CONFIGURE_ARGS+= --without-iksemel
.endif
MAKE_FLAGS+= GLOBAL_MAKEOPTS=${WRKSRC}/pkgsrc.makeopts
post-configure:
.if !empty(PKG_OPTIONS:Mx11)
${ECHO} "MENUSELECT_PBX=-pbx_gtkconsole" >> ${WRKSRC}/pkgsrc.makeopts
.endif
.if !empty(PKG_OPTIONS:Munixodbc)
${ECHO} "MENUSELECT_OPTS_app_voicemail=ODBC_STORAGE" >> ${WRKSRC}/pkgsrc.makeopts
.endif
.if defined(PLIST.mgcp)
${ECHO} "MENUSELECT_RES=-res_pktccops" >> ${WRKSRC}/pkgsrc.makeopts
${ECHO} "MENUSELECT_CHANNELS=-chan_mgcp" >> ${WRKSRC}/pkgsrc.makeopts
.endif
${ECHO} "MENUSELECT_AGIS=agi-test.agi eagi-test eagi-sphinx-test jukebox.agi" >> ${WRKSRC}/pkgsrc.makeopts
# this is a hack to work around a bug in menuselect
cd ${WRKSRC} && make menuselect.makeopts
.if !empty(PKG_OPTIONS:Mwebvmail)
DEPENDS+= p5-DBI-[0-9]*:../../databases/p5-DBI
SUBST_CLASSES+= webvmail
SUBST_STAGE.webvmail= post-patch
SUBST_FILES.webvmail= contrib/scripts/vmail.cgi
SUBST_SED.webvmail+= -e 's|@ASTETCDIR@|${ASTETCDIR}|'
SUBST_SED.webvmail+= -e "s|@ASTSPOOLDIR@|${ASTSPOOLDIR}|"
INSTALLATION_DIRS+= ${PREFIX}/libexec/cgi-bin ${PREFIX}/share/httpd/htdocs
SPECIAL_PERMS+= ${PREFIX}/libexec/cgi-bin/vmail ${ASTERISK_USER} ${ASTERISK_GROUP} 04555
INSTALL_TARGET+= webvmail
PLIST.webvmail= yes
.endif
.if !empty(PKG_OPTIONS:Mldap)
.include "../../databases/openldap-client/buildlink3.mk"
PLIST.ldap= yes
.else
CONFIGURE_ARGS+= --without-ldap
.endif
.if !empty(PKG_OPTIONS:Mspeex)
.include "../../audio/speex/buildlink3.mk"
.include "../../audio/speexdsp/buildlink3.mk"
CONFIGURE_ARGS+= --with-speex
CONFIGURE_ARGS+= --with-speexdsp
PLIST.speex= yes
.else
CONFIGURE_ARGS+= --without-speex
CONFIGURE_ARGS+= --without-speexdsp
.endif
.if !empty(PKG_OPTIONS:Msnmp)
.include "../../net/net-snmp/buildlink3.mk"
CONFIGURE_ARGS+= --with-netsnmp
PLIST.snmp= yes
.else
CONFIGURE_ARGS+= --without-netsnmp
.endif
.if !empty(PKG_OPTIONS:Mpgsql)
.include "../../mk/pgsql.buildlink3.mk"
CONFIGURE_ARGS+= --with-postgres
PLIST.pgsql= yes
.else
CONFIGURE_ARGS+= --without-postgres
.endif

View File

@@ -0,0 +1,145 @@
$NetBSD: patch-Makefile,v 1.3 2016/05/06 07:41:06 jnemeth Exp $
--- Makefile.orig 2016-04-20 10:46:18.000000000 +0000
+++ Makefile
@@ -135,7 +135,7 @@ DEBUG=-g3
# Asterisk.conf is located in ASTETCDIR or by using the -C flag
# when starting Asterisk
-ASTCONFPATH=$(ASTETCDIR)/asterisk.conf
+ASTCONFPATH=$(ASTEXAMPLEDIR)/asterisk.conf
AGI_DIR=$(ASTDATADIR)/agi-bin
# If you use Apache, you may determine by a grep 'DocumentRoot' of your httpd.conf file
@@ -172,6 +172,9 @@ DAHDI_UDEV_HOOK_DIR = /usr/share/dahdi/s
# supported run:
# menuselect/menuselect --help
+GLOBAL_MAKEOPTS=$(wildcard /etc/asterisk.makeopts)
+USER_MAKEOPTS=$(wildcard ~/.asterisk.makeopts)
+
MOD_SUBDIR_CFLAGS="-I$(ASTTOPDIR)/include"
OTHER_SUBDIR_CFLAGS="-I$(ASTTOPDIR)/include"
@@ -211,10 +214,6 @@ ifeq ($(AST_DEVMODE),yes)
ADDL_TARGETS+=validate-docs
endif
-ifneq ($(findstring BSD,$(OSARCH)),)
- _ASTCFLAGS+=-isystem /usr/local/include
-endif
-
ifeq ($(OSARCH),FreeBSD)
# -V is understood by BSD Make, not by GNU make.
BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk)
@@ -342,10 +341,10 @@ makeopts: configure
@echo "****"
@exit 1
-menuselect.makeopts: menuselect/menuselect menuselect-tree makeopts build_tools/menuselect-deps
+menuselect.makeopts: menuselect/menuselect menuselect-tree makeopts build_tools/menuselect-deps $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS)
ifeq ($(filter %menuselect,$(MAKECMDGOALS)),)
menuselect/menuselect --check-deps $@
- menuselect/menuselect --check-deps $@
+ menuselect/menuselect --check-deps $@ $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS)
endif
$(MOD_SUBDIRS_EMBED_LDSCRIPT):
@@ -445,7 +444,6 @@ dist-clean: distclean
distclean: $(SUBDIRS_DIST_CLEAN) _clean
@$(MAKE) -C menuselect dist-clean
- @$(MAKE) -C sounds dist-clean
rm -f menuselect.makeopts makeopts menuselect-tree menuselect.makedeps
rm -f makeopts.embed_rules
rm -f config.log config.status config.cache
@@ -561,7 +559,7 @@ update:
NEWHEADERS=$(notdir $(wildcard include/asterisk/*.h))
OLDHEADERS=$(filter-out $(NEWHEADERS) $(notdir $(DESTDIR)$(ASTHEADERDIR)),$(notdir $(wildcard $(DESTDIR)$(ASTHEADERDIR)/*.h)))
-INSTALLDIRS="$(ASTLIBDIR)" "$(ASTMODDIR)" "$(ASTSBINDIR)" "$(ASTETCDIR)" "$(ASTVARRUNDIR)" \
+INSTALLDIRS="$(ASTLIBDIR)" "$(ASTMODDIR)" "$(ASTSBINDIR)" "$(ASTEXAMPLEDIR)" "$(ASTVARRUNDIR)" \
"$(ASTSPOOLDIR)" "$(ASTSPOOLDIR)/dictate" "$(ASTSPOOLDIR)/meetme" \
"$(ASTSPOOLDIR)/monitor" "$(ASTSPOOLDIR)/system" "$(ASTSPOOLDIR)/tmp" \
"$(ASTSPOOLDIR)/voicemail" "$(ASTSPOOLDIR)/recording" \
@@ -688,7 +686,7 @@ upgrade: bininstall
# (2) the extension to strip off
define INSTALL_CONFIGS
@for x in configs/$(1)/*$(2); do \
- dst="$(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x $(2)`"; \
+ dst="$(DESTDIR)$(ASTEXAMPLEDIR)/`$(BASENAME) $$x $(2)`"; \
if [ -f "$${dst}" ]; then \
if [ "$(OVERWRITE)" = "y" ]; then \
if cmp -s "$${dst}" "$$x" ; then \
@@ -717,24 +715,24 @@ define INSTALL_CONFIGS
-e 's|^astrundir.*$$|astrundir => $(ASTVARRUNDIR)|' \
-e 's|^astlogdir.*$$|astlogdir => $(ASTLOGDIR)|' \
-e 's|^astsbindir.*$$|astsbindir => $(ASTSBINDIR)|' \
- "$(DESTDIR)$(ASTCONFPATH)" > "$(DESTDIR)$(ASTCONFPATH).tmp" ; \
- $(INSTALL) -m 644 "$(DESTDIR)$(ASTCONFPATH).tmp" "$(DESTDIR)$(ASTCONFPATH)" ; \
- rm -f "$(DESTDIR)$(ASTCONFPATH).tmp" ; \
+ "$(DESTDIR)$(ASTEXAMPLEDIR)/asterisk.conf" > "$(DESTDIR)$(ASTEXAMPLEDIR)/asterisk.conf.tmp" ; \
+ $(INSTALL) -m 644 "$(DESTDIR)$(ASTEXAMPLEDIR)/asterisk.conf.tmp" "$(DESTDIR)$(ASTEXAMPLEDIR)/asterisk.conf" ; \
+ rm -f "$(DESTDIR)$(ASTEXAMPLEDIR)/asterisk.conf.tmp" ; \
fi
endef
# XXX why *.adsi is installed first ?
adsi:
@echo Installing adsi config files...
- $(INSTALL) -d "$(DESTDIR)$(ASTETCDIR)"
+ $(INSTALL) -d "$(DESTDIR)$(ASTEXAMPLEDIR)"
@for x in configs/samples/*.adsi; do \
- dst="$(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x`" ; \
+ dst="$(DESTDIR)$(ASTEXAMPLEDIR)/`$(BASENAME) $$x`" ; \
if [ -f "$${dst}" ] ; then \
echo "Overwriting $$x" ; \
else \
echo "Installing $$x" ; \
fi ; \
- $(INSTALL) -m 644 "$$x" "$(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x`" ; \
+ $(INSTALL) -m 644 "$$x" "$(DESTDIR)$(ASTEXAMPLEDIR)/`$(BASENAME) $$x`" ; \
done
samples: adsi
@@ -767,7 +765,7 @@ basic-pbx:
webvmail:
@[ -d "$(DESTDIR)$(HTTP_DOCSDIR)/" ] || ( printf "http docs directory not found.\nUpdate assignment of variable HTTP_DOCSDIR in Makefile!\n" && exit 1 )
@[ -d "$(DESTDIR)$(HTTP_CGIDIR)" ] || ( printf "cgi-bin directory not found.\nUpdate assignment of variable HTTP_CGIDIR in Makefile!\n" && exit 1 )
- $(INSTALL) -m 4755 contrib/scripts/vmail.cgi "$(DESTDIR)$(HTTP_CGIDIR)/vmail.cgi"
+ $(INSTALL) contrib/scripts/vmail.cgi "$(DESTDIR)$(HTTP_CGIDIR)/vmail"
$(INSTALL) -d "$(DESTDIR)$(HTTP_DOCSDIR)/_asterisk"
for x in images/*.gif; do \
$(INSTALL) -m 644 $$x "$(DESTDIR)$(HTTP_DOCSDIR)/_asterisk/"; \
@@ -817,11 +815,11 @@ endif
endif
install-logrotate:
- if [ ! -d "$(DESTDIR)$(ASTETCDIR)/../logrotate.d" ]; then \
- $(INSTALL) -d "$(DESTDIR)$(ASTETCDIR)/../logrotate.d" ; \
+ if [ ! -d "$(DESTDIR)$(ASTEXAMPLEDIR)/../logrotate.d" ]; then \
+ $(INSTALL) -d "$(DESTDIR)$(ASTEXAMPLEDIR)/../logrotate.d" ; \
fi
sed 's#__LOGDIR__#$(ASTLOGDIR)#g' < contrib/scripts/asterisk.logrotate | sed 's#__SBINDIR__#$(ASTSBINDIR)#g' > contrib/scripts/asterisk.logrotate.tmp
- $(INSTALL) -m 0644 contrib/scripts/asterisk.logrotate.tmp "$(DESTDIR)$(ASTETCDIR)/../logrotate.d/asterisk"
+ $(INSTALL) -m 0644 contrib/scripts/asterisk.logrotate.tmp "$(DESTDIR)$(ASTEXAMPLEDIR)/../logrotate.d/asterisk"
rm -f contrib/scripts/asterisk.logrotate.tmp
config:
@@ -932,7 +930,7 @@ uninstall-all: _uninstall
rm -rf "$(DESTDIR)$(ASTVARLIBDIR)"
rm -rf "$(DESTDIR)$(ASTDATADIR)"
rm -rf "$(DESTDIR)$(ASTSPOOLDIR)"
- rm -rf "$(DESTDIR)$(ASTETCDIR)"
+ rm -rf "$(DESTDIR)$(ASTEXAMPLEDIR)"
rm -rf "$(DESTDIR)$(ASTLOGDIR)"
menuconfig: menuselect
@@ -1021,6 +1019,7 @@ check-alembic: makeopts
@ALEMBIC=$(ALEMBIC) build_tools/make_check_alembic config cdr voicemail >&2
.PHONY: menuselect
+.PHONY: menuselect.makeopts
.PHONY: main
.PHONY: sounds
.PHONY: clean

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-addons_chan__ooh323.c,v 1.1.1.1 2015/12/05 23:29:09 jnemeth Exp $
--- addons/chan_ooh323.c.orig 2015-10-09 21:48:48.000000000 +0000
+++ addons/chan_ooh323.c
@@ -3985,7 +3985,7 @@ static void *do_monitor(void *data)
h323->lastrtprx + h323->rtptimeout < t) {
if (!ast_channel_trylock(h323->owner)) {
ast_softhangup_nolock(h323->owner, AST_SOFTHANGUP_DEV);
- ast_log(LOG_NOTICE, "Disconnecting call '%s' for lack of RTP activity in %ld seconds\n", ast_channel_name(h323->owner), (long) (t - h323->lastrtprx));
+ ast_log(LOG_NOTICE, "Disconnecting call '%s' for lack of RTP activity in %jd seconds\n", ast_channel_name(h323->owner), (intmax_t) (t - h323->lastrtprx));
ast_channel_unlock(h323->owner);
}

View File

@@ -0,0 +1,22 @@
$NetBSD: patch-apps_app__dumpchan.c,v 1.1.1.1 2015/12/05 23:29:09 jnemeth Exp $
--- apps/app_dumpchan.c.orig 2015-10-09 21:48:48.000000000 +0000
+++ apps/app_dumpchan.c
@@ -117,7 +117,7 @@ static int serialize_showchan(struct ast
"1stFileDescriptor= %d\n"
"Framesin= %u %s\n"
"Framesout= %u %s\n"
- "TimetoHangup= %ld\n"
+ "TimetoHangup= %jd\n"
"ElapsedTime= %dh%dm%ds\n"
"BridgeID= %s\n"
"Context= %s\n"
@@ -155,7 +155,7 @@ static int serialize_showchan(struct ast
ast_channel_fd(c, 0),
ast_channel_fin(c) & ~DEBUGCHAN_FLAG, (ast_channel_fin(c) & DEBUGCHAN_FLAG) ? " (DEBUGGED)" : "",
ast_channel_fout(c) & ~DEBUGCHAN_FLAG, (ast_channel_fout(c) & DEBUGCHAN_FLAG) ? " (DEBUGGED)" : "",
- (long)ast_channel_whentohangup(c)->tv_sec,
+ (intmax_t)ast_channel_whentohangup(c)->tv_sec,
hour,
min,
sec,

View File

@@ -0,0 +1,22 @@
$NetBSD: patch-apps_app__followme.c,v 1.1.1.1 2015/12/05 23:29:09 jnemeth Exp $
--- apps/app_followme.c.orig 2015-10-09 21:48:48.000000000 +0000
+++ apps/app_followme.c
@@ -380,7 +380,7 @@ static struct number *create_followme_nu
*tmp = '\0';
ast_copy_string(cur->number, buf, sizeof(cur->number));
cur->order = numorder;
- ast_debug(1, "Created a number, %s, order of , %d, with a timeout of %ld.\n", cur->number, cur->order, cur->timeout);
+ ast_debug(1, "Created a number, %s, order of , %d, with a timeout of %jd.\n", cur->number, cur->order, (intmax_t)cur->timeout);
return cur;
}
@@ -1010,7 +1010,7 @@ static struct ast_channel *findmeexec(st
break;
}
- ast_debug(2, "Number(s) %s timeout %ld\n", nm->number, nm->timeout);
+ ast_debug(2, "Number(s) %s timeout %jd\n", nm->number, (intmax_t)nm->timeout);
/*
* Put all active outgoing channels into autoservice.

View File

@@ -0,0 +1,117 @@
$NetBSD: patch-apps_app__queue.c,v 1.1.1.1 2015/12/05 23:29:09 jnemeth Exp $
--- apps/app_queue.c.orig 2015-10-09 21:48:48.000000000 +0000
+++ apps/app_queue.c
@@ -5286,7 +5286,7 @@ static int wait_our_turn(struct queue_en
if ((status = get_member_status(qe->parent, qe->max_penalty, qe->min_penalty, qe->parent->leavewhenempty, 0))) {
*reason = QUEUE_LEAVEEMPTY;
- ast_queue_log(qe->parent->name, ast_channel_uniqueid(qe->chan), "NONE", "EXITEMPTY", "%d|%d|%ld", qe->pos, qe->opos, (long) (time(NULL) - qe->start));
+ ast_queue_log(qe->parent->name, ast_channel_uniqueid(qe->chan), "NONE", "EXITEMPTY", "%d|%d|%jd", qe->pos, qe->opos, (intmax_t) (time(NULL) - qe->start));
leave_queue(qe);
break;
}
@@ -6638,8 +6638,8 @@ static int try_calling(struct queue_ent
/* if setinterfacevar is defined, make member variables available to the channel */
/* use pbx_builtin_setvar to set a load of variables with one call */
if (qe->parent->setinterfacevar) {
- snprintf(interfacevar, sizeof(interfacevar), "MEMBERINTERFACE=%s,MEMBERNAME=%s,MEMBERCALLS=%d,MEMBERLASTCALL=%ld,MEMBERPENALTY=%d,MEMBERDYNAMIC=%d,MEMBERREALTIME=%d",
- member->interface, member->membername, member->calls, (long)member->lastcall, member->penalty, member->dynamic, member->realtime);
+ snprintf(interfacevar, sizeof(interfacevar), "MEMBERINTERFACE=%s,MEMBERNAME=%s,MEMBERCALLS=%d,MEMBERLASTCALL=%jd,MEMBERPENALTY=%d,MEMBERDYNAMIC=%d,MEMBERREALTIME=%d",
+ member->interface, member->membername, member->calls, (intmax_t)member->lastcall, member->penalty, member->dynamic, member->realtime);
pbx_builtin_setvar_multiple(qe->chan, interfacevar);
pbx_builtin_setvar_multiple(peer, interfacevar);
}
@@ -6647,8 +6647,8 @@ static int try_calling(struct queue_ent
/* if setqueueentryvar is defined, make queue entry (i.e. the caller) variables available to the channel */
/* use pbx_builtin_setvar to set a load of variables with one call */
if (qe->parent->setqueueentryvar) {
- snprintf(interfacevar, sizeof(interfacevar), "QEHOLDTIME=%ld,QEORIGINALPOS=%d",
- (long) (time(NULL) - qe->start), qe->opos);
+ snprintf(interfacevar, sizeof(interfacevar), "QEHOLDTIME=%jd,QEORIGINALPOS=%d",
+ (intmax_t) (time(NULL) - qe->start), qe->opos);
pbx_builtin_setvar_multiple(qe->chan, interfacevar);
pbx_builtin_setvar_multiple(peer, interfacevar);
}
@@ -7838,8 +7838,8 @@ static int queue_exec(struct ast_channel
}
}
- ast_debug(1, "queue: %s, expires: %ld, priority: %d\n",
- args.queuename, (long)qe.expire, prio);
+ ast_debug(1, "queue: %s, expires: %jd, priority: %d\n",
+ args.queuename, (intmax_t)qe.expire, prio);
qe.chan = chan;
qe.prio = prio;
@@ -7889,8 +7889,8 @@ check_turns:
record_abandoned(&qe);
reason = QUEUE_TIMEOUT;
res = 0;
- ast_queue_log(args.queuename, ast_channel_uniqueid(chan),"NONE", "EXITWITHTIMEOUT", "%d|%d|%ld",
- qe.pos, qe.opos, (long) (time(NULL) - qe.start));
+ ast_queue_log(args.queuename, ast_channel_uniqueid(chan),"NONE", "EXITWITHTIMEOUT", "%d|%d|%jd",
+ qe.pos, qe.opos, (intmax_t) (time(NULL) - qe.start));
break;
}
@@ -7935,7 +7935,7 @@ check_turns:
if ((status = get_member_status(qe.parent, qe.max_penalty, qe.min_penalty, qe.parent->leavewhenempty, 0))) {
record_abandoned(&qe);
reason = QUEUE_LEAVEEMPTY;
- ast_queue_log(args.queuename, ast_channel_uniqueid(chan), "NONE", "EXITEMPTY", "%d|%d|%ld", qe.pos, qe.opos, (long)(time(NULL) - qe.start));
+ ast_queue_log(args.queuename, ast_channel_uniqueid(chan), "NONE", "EXITEMPTY", "%d|%d|%jd", qe.pos, qe.opos, (intmax_t)(time(NULL) - qe.start));
res = 0;
break;
}
@@ -7958,7 +7958,7 @@ check_turns:
record_abandoned(&qe);
reason = QUEUE_TIMEOUT;
res = 0;
- ast_queue_log(qe.parent->name, ast_channel_uniqueid(qe.chan),"NONE", "EXITWITHTIMEOUT", "%d|%d|%ld", qe.pos, qe.opos, (long) (time(NULL) - qe.start));
+ ast_queue_log(qe.parent->name, ast_channel_uniqueid(qe.chan),"NONE", "EXITWITHTIMEOUT", "%d|%d|%jd", qe.pos, qe.opos, (intmax_t) (time(NULL) - qe.start));
break;
}
@@ -7986,8 +7986,8 @@ stop:
if (!qe.handled) {
record_abandoned(&qe);
ast_queue_log(args.queuename, ast_channel_uniqueid(chan), "NONE", "ABANDON",
- "%d|%d|%ld", qe.pos, qe.opos,
- (long) (time(NULL) - qe.start));
+ "%d|%d|%jd", qe.pos, qe.opos,
+ (intmax_t) (time(NULL) - qe.start));
res = -1;
} else if (qcontinue) {
reason = QUEUE_CONTINUE;
@@ -7995,7 +7995,7 @@ stop:
}
} else if (qe.valid_digits) {
ast_queue_log(args.queuename, ast_channel_uniqueid(chan), "NONE", "EXITWITHKEY",
- "%s|%d|%d|%ld", qe.digits, qe.pos, qe.opos, (long) (time(NULL) - qe.start));
+ "%s|%d|%d|%jd", qe.digits, qe.pos, qe.opos, (intmax_t) (time(NULL) - qe.start));
}
}
@@ -9163,9 +9163,9 @@ static char *__queues_show(struct manses
do_print(s, fd, " Callers: ");
for (qe = q->head; qe; qe = qe->next) {
- ast_str_set(&out, 0, " %d. %s (wait: %ld:%2.2ld, prio: %d)",
- pos++, ast_channel_name(qe->chan), (long) (now - qe->start) / 60,
- (long) (now - qe->start) % 60, qe->prio);
+ ast_str_set(&out, 0, " %d. %s (wait: %jd:%2.2jd, prio: %d)",
+ pos++, ast_channel_name(qe->chan), (intmax_t) (now - qe->start) / 60,
+ (intmax_t) (now - qe->start) % 60, qe->prio);
do_print(s, fd, ast_str_buffer(out));
}
}
@@ -9531,7 +9531,7 @@ static int manager_queues_status(struct
"CallerIDName: %s\r\n"
"ConnectedLineNum: %s\r\n"
"ConnectedLineName: %s\r\n"
- "Wait: %ld\r\n"
+ "Wait: %jd\r\n"
"%s"
"\r\n",
q->name, pos++, ast_channel_name(qe->chan), ast_channel_uniqueid(qe->chan),

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-apps_app__sms.c,v 1.1.1.1 2015/12/05 23:29:09 jnemeth Exp $
--- apps/app_sms.c.orig 2015-10-09 21:48:48.000000000 +0000
+++ apps/app_sms.c
@@ -555,7 +555,7 @@ static void packdate(unsigned char *o, t
int z;
ast_localtime(&topack, &t, NULL);
-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined( __NetBSD__ ) || defined(__APPLE__) || defined(__CYGWIN__)
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined( __NetBSD__ ) || defined(__APPLE__) || defined(__CYGWIN__) || defined(__DragonFly__)
z = -t.tm_gmtoff / 60 / 15;
#else
z = timezone / 60 / 15;

View File

@@ -0,0 +1,67 @@
$NetBSD: patch-apps_app__voicemail.c,v 1.1.1.1 2015/12/05 23:29:09 jnemeth Exp $
--- apps/app_voicemail.c.orig 2015-10-09 21:48:48.000000000 +0000
+++ apps/app_voicemail.c
@@ -5182,7 +5182,7 @@ static void make_email_file(FILE *p,
}
fprintf(p, "X-Asterisk-VM-Message-Type: %s" ENDL, msgnum > -1 ? "Message" : greeting_attachment);
fprintf(p, "X-Asterisk-VM-Orig-date: %s" ENDL, date);
- fprintf(p, "X-Asterisk-VM-Orig-time: %ld" ENDL, (long) time(NULL));
+ fprintf(p, "X-Asterisk-VM-Orig-time: %jd" ENDL, (intmax_t) time(NULL));
fprintf(p, "X-Asterisk-VM-Message-ID: %s" ENDL, msg_id);
}
if (!ast_strlen_zero(cidnum)) {
@@ -6118,7 +6118,7 @@ static void generate_msg_id(char *dst)
* but only in single system solutions.
*/
unsigned int unique_counter = ast_atomic_fetchadd_int(&msg_id_incrementor, +1);
- snprintf(dst, MSG_ID_LEN, "%ld-%08x", (long) time(NULL), unique_counter);
+ snprintf(dst, MSG_ID_LEN, "%jd-%08x", (intmax_t) time(NULL), unique_counter);
}
/*!
@@ -6239,7 +6239,7 @@ static int msg_create_from_file(struct a
"callerchan=%s\n"
"callerid=%s\n"
"origdate=%s\n"
- "origtime=%ld\n"
+ "origtime=%jd\n"
"category=%s\n"
"msg_id=%s\n"
"flag=\n" /* flags not supported in copy from file yet */
@@ -6252,7 +6252,7 @@ static int msg_create_from_file(struct a
recdata->call_priority,
S_OR(recdata->call_callerchan, "Unknown"),
S_OR(recdata->call_callerid, "Unknown"),
- date, (long) time(NULL),
+ date, (intmax_t) time(NULL),
S_OR(category, ""),
msg_id,
duration);
@@ -6761,7 +6761,7 @@ static int leave_voicemail(struct ast_ch
/* Store information in real-time storage */
if (ast_check_realtime("voicemail_data")) {
snprintf(priority, sizeof(priority), "%d", ast_channel_priority(chan));
- snprintf(origtime, sizeof(origtime), "%ld", (long) time(NULL));
+ snprintf(origtime, sizeof(origtime), "%jd", (intmax_t) time(NULL));
get_date(date, sizeof(date));
ast_callerid_merge(callerid, sizeof(callerid),
S_COR(ast_channel_caller(chan)->id.name.valid, ast_channel_caller(chan)->id.name.str, NULL),
@@ -6805,7 +6805,7 @@ static int leave_voicemail(struct ast_ch
"callerchan=%s\n"
"callerid=%s\n"
"origdate=%s\n"
- "origtime=%ld\n"
+ "origtime=%jd\n"
"category=%s\n"
"msg_id=%s\n",
ext,
@@ -6817,7 +6817,7 @@ static int leave_voicemail(struct ast_ch
ast_channel_priority(chan),
ast_channel_name(chan),
callerid,
- date, (long) time(NULL),
+ date, (intmax_t) time(NULL),
category ? category : "",
msg_id);
} else {

View File

@@ -0,0 +1,19 @@
$NetBSD: patch-build__tools_mkpkgconfig,v 1.1.1.1 2015/12/05 23:29:09 jnemeth Exp $
--- build_tools/mkpkgconfig.orig 2015-10-09 21:48:48.000000000 +0000
+++ build_tools/mkpkgconfig
@@ -22,11 +22,14 @@ else
fi
## Clean out CFLAGS for the spec file.
+## pkgsrc -- the regex below isn't sed compatible, so always use perl
+EXTREGEX="perl -pe"
LOCAL_CFLAGS=`echo $CFLAGS | ${EXTREGEX} 's/-pipe\s*//g' | ${EXTREGEX} 's/-[Wmp]\S*\s*//g' | \
${EXTREGEX} 's/\s+-I(include|\.\.\/include)\s+/ /g' | \
${EXTREGEX} 's/-DINSTALL_PREFIX=\S* //g' | \
${EXTREGEX} 's/-DASTERISK_VERSION=\S* //g' | \
${EXTREGEX} 's/-DAST(ETCDIR|LIBDIR|VARLIBDIR|VARRUNDIR|SPOOLDIR|LOGDIR|CONFPATH|MODDIR|AGIDIR)=\S* //g' | \
+ ${EXTREGEX} "s;${WRKSRC};${PREFIX};g" | \
${EXTREGEX} 's/^\s|\s$//g'`
cat <<EOF > "$PPATH/asterisk.pc"

View File

@@ -0,0 +1,31 @@
$NetBSD: patch-cdr_cdr__pgsql.c,v 1.1.1.1 2015/12/05 23:29:09 jnemeth Exp $
--- cdr/cdr_pgsql.c.orig 2015-10-09 21:48:48.000000000 +0000
+++ cdr/cdr_pgsql.c
@@ -283,7 +283,7 @@ static int pgsql_log(struct ast_cdr *cdr
if (strcmp(cur->name, "start") == 0 || strcmp(cur->name, "calldate") == 0) {
if (strncmp(cur->type, "int", 3) == 0) {
LENGTHEN_BUF2(13);
- ast_str_append(&sql2, 0, "%s%ld", first ? "" : ",", (long) cdr->start.tv_sec);
+ ast_str_append(&sql2, 0, "%s%jd", first ? "" : ",", (intmax_t) cdr->start.tv_sec);
} else if (strncmp(cur->type, "float", 5) == 0) {
LENGTHEN_BUF2(31);
ast_str_append(&sql2, 0, "%s%f", first ? "" : ",", (double)cdr->start.tv_sec + (double)cdr->start.tv_usec / 1000000.0);
@@ -297,7 +297,7 @@ static int pgsql_log(struct ast_cdr *cdr
} else if (strcmp(cur->name, "answer") == 0) {
if (strncmp(cur->type, "int", 3) == 0) {
LENGTHEN_BUF2(13);
- ast_str_append(&sql2, 0, "%s%ld", first ? "" : ",", (long) cdr->answer.tv_sec);
+ ast_str_append(&sql2, 0, "%s%jd", first ? "" : ",", (intmax_t) cdr->answer.tv_sec);
} else if (strncmp(cur->type, "float", 5) == 0) {
LENGTHEN_BUF2(31);
ast_str_append(&sql2, 0, "%s%f", first ? "" : ",", (double)cdr->answer.tv_sec + (double)cdr->answer.tv_usec / 1000000.0);
@@ -311,7 +311,7 @@ static int pgsql_log(struct ast_cdr *cdr
} else if (strcmp(cur->name, "end") == 0) {
if (strncmp(cur->type, "int", 3) == 0) {
LENGTHEN_BUF2(13);
- ast_str_append(&sql2, 0, "%s%ld", first ? "" : ",", (long) cdr->end.tv_sec);
+ ast_str_append(&sql2, 0, "%s%jd", first ? "" : ",", (intmax_t) cdr->end.tv_sec);
} else if (strncmp(cur->type, "float", 5) == 0) {
LENGTHEN_BUF2(31);
ast_str_append(&sql2, 0, "%s%f", first ? "" : ",", (double)cdr->end.tv_sec + (double)cdr->end.tv_usec / 1000000.0);

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-cel_cel__pgsql.c,v 1.1.1.1 2015/12/05 23:29:09 jnemeth Exp $
--- cel/cel_pgsql.c.orig 2015-10-09 21:48:48.000000000 +0000
+++ cel/cel_pgsql.c
@@ -205,7 +205,7 @@ static void pgsql_log(struct ast_event *
if (strcmp(cur->name, "eventtime") == 0) {
if (strncmp(cur->type, "int", 3) == 0) {
LENGTHEN_BUF2(13);
- ast_str_append(&sql2, 0, "%s%ld", SEP, (long) record.event_time.tv_sec);
+ ast_str_append(&sql2, 0, "%s%jd", SEP, (intmax_t) record.event_time.tv_sec);
} else if (strncmp(cur->type, "float", 5) == 0) {
LENGTHEN_BUF2(31);
ast_str_append(&sql2, 0, "%s%f",

View File

@@ -0,0 +1,31 @@
$NetBSD: patch-channels_chan__oss.c,v 1.1.1.1 2015/12/05 23:29:09 jnemeth Exp $
--- channels/chan_oss.c.orig 2015-10-09 21:48:48.000000000 +0000
+++ channels/chan_oss.c
@@ -53,7 +53,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revisi
#ifdef __linux
#include <linux/soundcard.h>
-#elif defined(__FreeBSD__) || defined(__CYGWIN__) || defined(__GLIBC__) || defined(__sun)
+#elif defined(__FreeBSD__) || defined(__CYGWIN__) || defined(__GLIBC__) || defined(__sun) || defined(__DragonFly__)
#include <sys/soundcard.h>
#else
#include <soundcard.h>
@@ -257,7 +257,7 @@ struct chan_oss_pvt {
char *name;
int total_blocks; /*!< total blocks in the output device */
int sounddev;
- enum { M_UNSET, M_FULL, M_READ, M_WRITE } duplex;
+ enum { M_UNSET, M_FULL, M_READ_foo, M_WRITE } duplex;
int autoanswer; /*!< Boolean: whether to answer the immediately upon calling */
int autohangup; /*!< Boolean: whether to hangup the call when the remote end hangs up */
int hookstate; /*!< Boolean: 1 if offhook; 0 if onhook */
@@ -524,7 +524,7 @@ static int setformat(struct chan_oss_pvt
break;
case O_RDONLY:
- o->duplex = M_READ;
+ o->duplex = M_READ_foo;
break;
}

View File

@@ -0,0 +1,22 @@
$NetBSD: patch-channels_chan__sip.c,v 1.1.1.1 2015/12/05 23:29:09 jnemeth Exp $
--- channels/chan_sip.c.orig 2015-10-09 21:48:48.000000000 +0000
+++ channels/chan_sip.c
@@ -19329,7 +19333,7 @@ static int manager_show_registry(struct
"DomainPort: %d\r\n"
"Refresh: %d\r\n"
"State: %s\r\n"
- "RegistrationTime: %ld\r\n"
+ "RegistrationTime: %jd\r\n"
"\r\n",
idtext,
iterator->hostname,
@@ -19339,7 +19343,7 @@ static int manager_show_registry(struct
iterator->regdomainport ? iterator->regdomainport : STANDARD_SIP_PORT,
iterator->refresh,
regstate2str(iterator->regstate),
- (long) iterator->regtime.tv_sec);
+ (intmax_t) iterator->regtime.tv_sec);
ao2_unlock(iterator);
ao2_t_ref(iterator, -1, "manager_show_registry iter");

View File

@@ -0,0 +1,15 @@
$NetBSD: patch-codecs_codec__dahdi.c,v 1.1.1.1 2015/12/05 23:29:09 jnemeth Exp $
--- codecs/codec_dahdi.c.orig 2015-10-09 21:48:48.000000000 +0000
+++ codecs/codec_dahdi.c
@@ -38,9 +38,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revisi
#include <fcntl.h>
#include <netinet/in.h>
+#include <poll.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
-#include <sys/poll.h>
#include <dahdi/user.h>
#include "asterisk/lock.h"

View File

@@ -0,0 +1,198 @@
$NetBSD: patch-configure,v 1.2 2016/09/23 17:50:19 jnemeth Exp $
--- configure.orig 2015-10-09 21:48:48.000000000 +0000
+++ configure
@@ -12920,7 +12920,7 @@ fi
-if test "x$JANSSON_LIB" == "x"; then
+if test "x$JANSSON_LIB" = "x"; then
as_fn_error $? "*** JSON support not found (this typically means the libjansson development package is missing)" "$LINENO" 5
fi
@@ -13441,7 +13441,7 @@ fi
done
-ac_fn_c_check_header_mongrel "$LINENO" "sys/poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default"
+ac_fn_c_check_header_mongrel "$LINENO" "poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_poll_h" = xyes; then :
else
@@ -15496,7 +15496,7 @@ fi
done
-for ac_func in asprintf atexit closefrom dup2 eaccess endpwent euidaccess ffsll ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday glob ioperm inet_ntoa isascii memchr memmove memset mkdir mkdtemp munmap newlocale ppoll putenv re_comp regcomp select setenv socket strcasecmp strcasestr strchr strcspn strdup strerror strlcat strlcpy strncasecmp strndup strnlen strrchr strsep strspn strstr strtod strtol strtold strtoq unsetenv utime vasprintf getpeereid sysctl swapctl
+for ac_func in asprintf atexit closefrom dup2 eaccess endpwent euidaccess ffsll ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday glob ioperm inet_ntoa isascii memchr memmove memset mkdir mkdtemp munmap newlocale ppoll putenv re_comp regcomp select setenv socket strcasecmp strcasestr strchr strcspn strdup strerror strftime_l strlcat strlcpy strncasecmp strndup strnlen strptime_l strrchr strsep strspn strstr strtod strtol strtold strtoq unsetenv utime vasprintf getpeereid sysctl swapctl
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -15731,7 +15731,7 @@ rm -f core conftest.err conftest.$ac_obj
LDFLAGS=${old_LDFLAGS}
rm -f conftest.dynamics
-ac_fn_c_check_header_mongrel "$LINENO" "sys/poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default"
+ac_fn_c_check_header_mongrel "$LINENO" "poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_poll_h" = xyes; then :
HAS_POLL=1
@@ -18063,6 +18063,148 @@ fi
+if test "${ac_cv_header_sys_atomic_h+set}" = set; then
+ { $as_echo "$as_me:$LINENO: checking for sys/atomic.h" >&5
+$as_echo_n "checking for sys/atomic.h... " >&6; }
+if test "${ac_cv_header_sys_atomic_h+set}" = set; then
+ $as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_atomic_h" >&5
+$as_echo "$ac_cv_header_sys_atomic_h" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking sys/atomic.h usability" >&5
+$as_echo_n "checking sys/atomic.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <sys/atomic.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking sys/atomic.h presence" >&5
+$as_echo_n "checking sys/atomic.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/atomic.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { $as_echo "$as_me:$LINENO: WARNING: sys/atomic.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: sys/atomic.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: sys/atomic.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: sys/atomic.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:$LINENO: WARNING: sys/atomic.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: sys/atomic.h: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: sys/atomic.h: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: sys/atomic.h: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: sys/atomic.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: sys/atomic.h: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: sys/atomic.h: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: sys/atomic.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: sys/atomic.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: sys/atomic.h: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: sys/atomic.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: sys/atomic.h: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to https://issues.asterisk.org ##
+## ------------------------------------------ ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for sys/atomic.h" >&5
+$as_echo_n "checking for sys/atomic.h... " >&6; }
+if test "${ac_cv_header_sys_atomic_h+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_header_sys_atomic_h=$ac_header_preproc
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_atomic_h" >&5
+$as_echo "$ac_cv_header_sys_atomic_h" >&6; }
+
+fi
+if test "x$ac_cv_header_sys_atomic_h" = x""yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_ATOMIC_H 1
+_ACEOF
+
+fi
+
+
+
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
@@ -19313,6 +19455,8 @@ $as_echo_n "checking if \"struct ifaddrs
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+ #include <sys/types.h>
+ #include <sys/socket.h>
#include <ifaddrs.h>
int
main ()

View File

@@ -0,0 +1,53 @@
$NetBSD: patch-configure.ac,v 1.2 2016/09/23 17:50:19 jnemeth Exp $
--- configure.ac.orig 2015-10-09 21:48:48.000000000 +0000
+++ configure.ac
@@ -572,7 +572,7 @@ AC_SUBST(UUID_LIB)
# Find required JSON support.
AST_EXT_LIB_CHECK([JANSSON], [jansson], [json_dumps], [jansson.h])
-if test "x$JANSSON_LIB" == "x"; then
+if test "x$JANSSON_LIB" = "x"; then
AC_MSG_ERROR([*** JSON support not found (this typically means the libjansson development package is missing)])
fi
@@ -610,7 +610,7 @@ AC_CHECK_HEADERS([xlocale.h])
AC_CHECK_HEADERS([winsock.h winsock2.h])
-AC_CHECK_HEADER([sys/poll.h],
+AC_CHECK_HEADER([poll.h],
[],
AC_DEFINE([AST_POLL_COMPAT], 1, [Define to 1 if internal poll should be used.]))
@@ -664,7 +664,7 @@ AC_FUNC_STRNLEN
AC_FUNC_STRTOD
AC_FUNC_UTIME_NULL
AC_FUNC_VPRINTF
-AC_CHECK_FUNCS([asprintf atexit closefrom dup2 eaccess endpwent euidaccess ffsll ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday glob ioperm inet_ntoa isascii memchr memmove memset mkdir mkdtemp munmap newlocale ppoll putenv re_comp regcomp select setenv socket strcasecmp strcasestr strchr strcspn strdup strerror strlcat strlcpy strncasecmp strndup strnlen strrchr strsep strspn strstr strtod strtol strtold strtoq unsetenv utime vasprintf getpeereid sysctl swapctl])
+AC_CHECK_FUNCS([asprintf atexit closefrom dup2 eaccess endpwent euidaccess ffsll ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday glob ioperm inet_ntoa isascii memchr memmove memset mkdir mkdtemp munmap newlocale ppoll putenv re_comp regcomp select setenv socket strcasecmp strcasestr strchr strcspn strdup strerror strftime_l strlcat strlcpy strncasecmp strndup strnlen strptime_l strrchr strsep strspn strstr strtod strtol strtold strtoq unsetenv utime vasprintf getpeereid sysctl swapctl])
AC_MSG_CHECKING(for htonll)
AC_LINK_IFELSE(
@@ -733,9 +733,9 @@ AC_SUBST(PBX_DYNAMIC_LIST)
LDFLAGS=${old_LDFLAGS}
rm -f conftest.dynamics
-AC_CHECK_HEADER([sys/poll.h],
+AC_CHECK_HEADER([poll.h],
[HAS_POLL=1]
- AC_DEFINE([HAVE_SYS_POLL_H], 1, [Define to 1 if your system has working sys/poll.h]),
+ AC_DEFINE([HAVE_SYS_POLL_H], 1, [Define to 1 if your system has working poll.h]),
)
AC_ARG_ENABLE([internal-poll],
@@ -1236,6 +1236,9 @@ AST_C_DEFINE_CHECK([IP_MTU_DISCOVER], [I
AC_CHECK_HEADER([libkern/OSAtomic.h],
[AC_DEFINE_UNQUOTED([HAVE_OSX_ATOMICS], 1, [Define to 1 if OSX atomic operations are supported.])])
+AC_CHECK_HEADER([sys/atomic.h],
+ [AC_DEFINE_UNQUOTED([HAVE_SYS_ATOMIC_H], 1, [Define to 1 if sys/atomic.h atomic operations are supported.])])
+
AC_CHECK_SIZEOF([int])
AC_CHECK_SIZEOF([long])
AC_CHECK_SIZEOF([long long])

View File

@@ -0,0 +1,187 @@
$NetBSD: patch-contrib_scripts_vmail.cgi,v 1.1.1.1 2015/12/05 23:29:10 jnemeth Exp $
--- contrib/scripts/vmail.cgi.orig 2015-10-09 21:48:48.000000000 +0000
+++ contrib/scripts/vmail.cgi
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/pkg/bin/perl
#
# Web based Voicemail for Asterisk
#
@@ -145,7 +145,7 @@ sub check_login($$)
$context = "default";
}
if (!$filename) {
- $filename = "/etc/asterisk/voicemail.conf";
+ $filename = "@ASTETCDIR@/voicemail.conf";
}
# print header;
# print "Including <h2>$filename</h2> while in <h2>$category</h2>...\n";
@@ -153,7 +153,7 @@ sub check_login($$)
while(<VMAIL>) {
chomp;
if (/include\s\"([^\"]+)\"$/) {
- ($tmp, $category) = &check_login("/etc/asterisk/$1", $category);
+ ($tmp, $category) = &check_login("@ASTETCDIR@/$1", $category);
if (length($tmp)) {
# print "Got '$tmp'\n";
return ($tmp, $category);
@@ -200,7 +200,7 @@ sub check_login_users {
my ($mbox, $context) = split(/\@/, param('mailbox'));
my $pass = param('password');
my ($found, $fullname) = (0, "");
- open VMAIL, "</etc/asterisk/users.conf";
+ open VMAIL, "<@ASTETCDIR@/users.conf";
while (<VMAIL>) {
chomp;
if (m/\[(.*)\]/) {
@@ -242,7 +242,7 @@ sub validmailbox($$$$)
$context = "default";
}
if (!$filename) {
- $filename = "/etc/asterisk/voicemail.conf";
+ $filename = "@ASTETCDIR@/voicemail.conf";
}
if (!$category) {
$category = "general";
@@ -251,7 +251,7 @@ sub validmailbox($$$$)
while (<VMAIL>) {
chomp;
if (/include\s\"([^\"]+)\"$/) {
- ($tmp, $category) = &validmailbox($mbox, $context, "/etc/asterisk/$1");
+ ($tmp, $category) = &validmailbox($mbox, $context, "@ASTETCDIR@/$1");
if ($tmp) {
return ($tmp, $category);
}
@@ -298,7 +298,7 @@ sub mailbox_options()
local $tmp2;
local $tmp;
if (!$filename) {
- $filename = "/etc/asterisk/voicemail.conf";
+ $filename = "@ASTETCDIR@/voicemail.conf";
}
if (!$category) {
$category = "general";
@@ -386,7 +386,7 @@ sub mailbox_list()
sub msgcount()
{
my ($context, $mailbox, $folder) = @_;
- my $path = "/var/spool/asterisk/voicemail/$context/$mailbox/$folder";
+ my $path = "@ASTSPOOLDIR@/voicemail/$context/$mailbox/$folder";
if (opendir(DIR, $path)) {
my @msgs = grep(/^msg....\.txt$/, readdir(DIR));
closedir(DIR);
@@ -410,7 +410,7 @@ sub msgcountstr()
sub messages()
{
my ($context, $mailbox, $folder) = @_;
- my $path = "/var/spool/asterisk/voicemail/$context/$mailbox/$folder";
+ my $path = "@ASTSPOOLDIR@/voicemail/$context/$mailbox/$folder";
if (opendir(DIR, $path)) {
my @msgs = sort grep(/^msg....\.txt$/, readdir(DIR));
closedir(DIR);
@@ -435,7 +435,7 @@ sub getfields()
{
my ($context, $mailbox, $folder, $msg) = @_;
my $fields;
- if (open(MSG, "</var/spool/asterisk/voicemail/$context/$mailbox/$folder/msg${msg}.txt")) {
+ if (open(MSG, "<@ASTSPOOLDIR@/voicemail/$context/$mailbox/$folder/msg${msg}.txt")) {
while(<MSG>) {
s/\#.*$//g;
if (/^(\w+)\s*\=\s*(.*)$/) {
@@ -560,7 +560,7 @@ _EOH
<input name="action" type=submit value="download">
</td></tr>
<tr><td colspan=2 align=center>
-<embed width=400 height=40 src="vmail.cgi?action=audio&folder=$folder&mailbox=$mbox&context=$context&password=$passwd&msgid=$msgid&format=$format&dontcasheme=$$.$format" autostart=yes loop=false></embed>
+<embed width=400 height=40 src="vmail?action=audio&folder=$folder&mailbox=$mbox&context=$context&password=$passwd&msgid=$msgid&format=$format&dontcasheme=$$.$format" autostart=yes loop=false></embed>
</td></tr></table>
</td></tr>
</table>
@@ -588,7 +588,7 @@ sub message_audio()
}
&untaint($format);
- my $path = "/var/spool/asterisk/voicemail/$context/$mailbox/$folder/msg${msgid}.$format";
+ my $path = "@ASTSPOOLDIR@/voicemail/$context/$mailbox/$folder/msg${msgid}.$format";
$msgid =~ /^\d\d\d\d$/ || die("Msgid Liar ($msgid)!");
grep(/^${format}$/, keys %formats) || die("Format Liar ($format)!");
@@ -809,11 +809,11 @@ sub message_rename()
die("Invalid old Message<BR>\n");
}
- my $path = "/var/spool/asterisk/voicemail/$context/$mbox/$newfolder";
+ my $path = "@ASTSPOOLDIR@/voicemail/$context/$mbox/$newfolder";
$path =~ /^(.*)$/;
$path = $1;
mkdir $path, 0770;
- $path = "/var/spool/asterisk/voicemail/$context/$mbox/$oldfolder";
+ $path = "@ASTSPOOLDIR@/voicemail/$context/$mbox/$oldfolder";
opendir(DIR, $path) || die("Unable to open directory\n");
my @files = grep /^msg${old}\.\w+$/, readdir(DIR);
closedir(DIR);
@@ -823,7 +823,7 @@ sub message_rename()
$tmp = $1;
$oldfile = $path . "/$tmp";
$tmp =~ s/msg${old}/msg${new}/;
- $newfile = "/var/spool/asterisk/voicemail/$context/$mbox/$newfolder/$tmp";
+ $newfile = "@ASTSPOOLDIR@/voicemail/$context/$mbox/$newfolder/$tmp";
# print "Renaming $oldfile to $newfile<BR>\n";
rename($oldfile, $newfile);
}
@@ -884,15 +884,15 @@ sub message_copy()
die("Invalid old Message<BR>\n");
}
- my $path = "/var/spool/asterisk/voicemail/$context/$newmbox";
+ my $path = "@ASTSPOOLDIR@/voicemail/$context/$newmbox";
$path =~ /^(.*)$/;
$path = $1;
mkdir $path, 0770;
- $path = "/var/spool/asterisk/voicemail/$context/$newmbox/INBOX";
+ $path = "@ASTSPOOLDIR@/voicemail/$context/$newmbox/INBOX";
$path =~ /^(.*)$/;
$path = $1;
mkdir $path, 0770;
- $path = "/var/spool/asterisk/voicemail/$context/$mbox/$oldfolder";
+ $path = "@ASTSPOOLDIR@/voicemail/$context/$mbox/$oldfolder";
opendir(DIR, $path) || die("Unable to open directory\n");
my @files = grep /^msg${old}\.\w+$/, readdir(DIR);
closedir(DIR);
@@ -902,7 +902,7 @@ sub message_copy()
$tmp = $1;
$oldfile = $path . "/$tmp";
$tmp =~ s/msg${old}/msg${new}/;
- $newfile = "/var/spool/asterisk/voicemail/$context/$newmbox/INBOX/$tmp";
+ $newfile = "@ASTSPOOLDIR@/voicemail/$context/$newmbox/INBOX/$tmp";
# print "Copying $oldfile to $newfile<BR>\n";
&file_copy($oldfile, $newfile);
}
@@ -932,7 +932,7 @@ sub message_delete()
} else {
die("Invalid Message<BR>\n");
}
- my $path = "/var/spool/asterisk/voicemail/$context/$mbox/$folder";
+ my $path = "@ASTSPOOLDIR@/voicemail/$context/$mbox/$folder";
opendir(DIR, $path) || die("Unable to open directory\n");
my @files = grep /^msg${msg}\.\w+$/, readdir(DIR);
closedir(DIR);
@@ -968,7 +968,7 @@ sub message_forward()
my $txt;
$context = &untaint($context);
$newmbox = &untaint($newmbox);
- my $path = "/var/spool/asterisk/voicemail/$context/$newmbox/INBOX";
+ my $path = "@ASTSPOOLDIR@/voicemail/$context/$newmbox/INBOX";
if ($msgs[0]) {
if (&lock_path($path) == 0) {
$msgcount = &msgcount($context, $newmbox, "INBOX");
@@ -1018,7 +1018,7 @@ sub message_delete_or_move()
$context = &untaint($context);
$mbox = &untaint($mbox);
$folder = &untaint($folder);
- $path = "/var/spool/asterisk/voicemail/$context/$mbox/$folder";
+ $path = "@ASTSPOOLDIR@/voicemail/$context/$mbox/$folder";
if ($msgs[0]) {
if (&lock_path($path) == 0) {
my $msgcount = &msgcount($context, $mbox, $folder);

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-funcs_func__env.c,v 1.1.1.1 2015/12/05 23:29:10 jnemeth Exp $
--- funcs/func_env.c.orig 2015-10-09 21:48:48.000000000 +0000
+++ funcs/func_env.c
@@ -309,7 +309,7 @@ static int stat_read(struct ast_channel
snprintf(buf, len, "%d", (int) s.st_ctime);
break;
case 'm':
- snprintf(buf, len, "%o", s.st_mode);
+ snprintf(buf, len, "%o", (unsigned int) s.st_mode);
break;
}
}

View File

@@ -0,0 +1,27 @@
$NetBSD: patch-include_asterisk_autoconfig.h.in,v 1.1.1.1 2015/12/05 23:29:10 jnemeth Exp $
--- include/asterisk/autoconfig.h.in.orig 2015-10-09 21:48:48.000000000 +0000
+++ include/asterisk/autoconfig.h.in
@@ -900,6 +900,12 @@
/* Define to 1 if you have the `strstr' function. */
#undef HAVE_STRSTR
+/* Define to 1 if you have the `strftime_l' function. */
+#undef HAVE_STRFTIME_L
+
+/* Define to 1 if you have the `strptime_l' function. */
+#undef HAVE_STRPTIME_L
+
/* Define to 1 if you have the `strtod' function. */
#undef HAVE_STRTOD
@@ -984,6 +990,9 @@
/* Define to 1 if you have the <syslog.h> header file. */
#undef HAVE_SYSLOG_H
+/* Define to 1 if sys/atomic.h atomic operations are supported. */
+#undef HAVE_SYS_ATOMIC_H
+
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
*/
#undef HAVE_SYS_DIR_H

View File

@@ -0,0 +1,16 @@
$NetBSD: patch-include_asterisk_endian.h,v 1.1.1.1 2015/12/05 23:29:10 jnemeth Exp $
--- include/asterisk/endian.h.orig 2015-10-09 21:48:48.000000000 +0000
+++ include/asterisk/endian.h
@@ -31,6 +31,11 @@
#ifndef __BYTE_ORDER
#ifdef __linux__
#include <endian.h>
+#elif defined(__DragonFly__)
+#include <sys/endian.h>
+#define __BYTE_ORDER BYTE_ORDER
+#define __LITTLE_ENDIAN LITTLE_ENDIAN
+#define __BIG_ENDIAN BIG_ENDIAN
#elif defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__)
#if defined(__OpenBSD__)
#include "asterisk/compat.h"

View File

@@ -0,0 +1,76 @@
$NetBSD: patch-include_asterisk_lock.h,v 1.1.1.1 2015/12/05 23:29:10 jnemeth Exp $
--- include/asterisk/lock.h.orig 2015-10-09 21:48:48.000000000 +0000
+++ include/asterisk/lock.h
@@ -634,6 +634,17 @@ static void __attribute__((destructor))
*/
#define SCOPED_CHANNELLOCK(varname, chan) SCOPED_LOCK(varname, (chan), ast_channel_lock, ast_channel_unlock)
+#undef pthread_mutex_lock
+#undef pthread_mutex_unlock
+#undef pthread_mutex_trylock
+#undef pthread_mutex_init
+#undef pthread_mutex_destroy
+#undef pthread_cond_init
+#undef pthread_cond_destroy
+#undef pthread_cond_signal
+#undef pthread_cond_broadcast
+#undef pthread_cond_wait
+#undef pthread_cond_timedwait
#ifndef __CYGWIN__ /* temporary disabled for cygwin */
#define pthread_mutex_t use_ast_mutex_t_instead_of_pthread_mutex_t
#define pthread_cond_t use_ast_cond_t_instead_of_pthread_cond_t
@@ -654,7 +665,7 @@ static void __attribute__((destructor))
#define gethostbyname __gethostbyname__is__not__reentrant__use__ast_gethostbyname__instead__
-#ifndef __linux__
+#if !defined(__linux__) && !defined(__DragonFly__)
#define pthread_create __use_ast_pthread_create_instead__
#endif
@@ -676,6 +687,10 @@ int ast_atomic_fetchadd_int_slow(volatil
#include "libkern/OSAtomic.h"
#endif
+#if defined(HAVE_SYS_ATOMIC_H)
+#include <sys/atomic.h>
+#endif
+
/*! \brief Atomically add v to *p and return * the previous value of *p.
* This can be used to handle reference counts, and the return value
* can be used to generate unique identifiers.
@@ -696,6 +711,16 @@ AST_INLINE_API(int ast_atomic_fetchadd_i
{
return OSAtomicAdd64(v, (int64_t *) p) - v;
})
+#elif defined(HAVE_SYS_ATOMIC_H) && (SIZEOF_INT == 4)
+AST_INLINE_API(int ast_atomic_fetchadd_int(volatile int *p, int v),
+{
+ return atomic_add_32_nv((uint32_t *)p, v) - v;
+})
+#elif defined(HAVE_SYS_ATOMIC_H) && (SIZEOF_INT == 8)
+AST_INLINE_API(int ast_atomic_fetchadd_int(volatile int *p, int v),
+{
+ return atomic_add_64_nv((uint64_t *)p, v) - v;
+})
#elif defined (__i386__) || defined(__x86_64__)
#ifdef sun
AST_INLINE_API(int ast_atomic_fetchadd_int(volatile int *p, int v),
@@ -743,6 +768,16 @@ AST_INLINE_API(int ast_atomic_dec_and_te
{
return OSAtomicAdd64( -1, (int64_t *) p) == 0;
})
+#elif defined(HAVE_SYS_ATOMIC_H) && (SIZEOF_INT == 4)
+AST_INLINE_API(int ast_atomic_dec_and_test(volatile int *p),
+{
+ return atomic_dec_32_nv((uint32_t *)p) == 0;
+})
+#elif defined(HAVE_SYS_ATOMIC_H) && (SIZEOF_INT == 8)
+AST_INLINE_API(int ast_atomic_dec_and_test(volatile int *p),
+{
+ return atomic_dec_64_nv((uint64_t *)p) == 0;
+})
#else
AST_INLINE_API(int ast_atomic_dec_and_test(volatile int *p),
{

View File

@@ -0,0 +1,131 @@
$NetBSD: patch-include_asterisk_sha1.h,v 1.1 2016/09/23 17:50:19 jnemeth Exp $
--- include/asterisk/sha1.h.orig 2016-09-09 16:14:37.000000000 +0000
+++ include/asterisk/sha1.h
@@ -191,49 +191,6 @@ typedef struct SHA256Context SHA224Conte
typedef struct SHA512Context SHA384Context;
/*
- * This structure holds context information for all SHA
- * hashing operations.
- */
-typedef struct USHAContext {
- int whichSha; /* which SHA is being used */
- union {
- SHA1Context sha1Context;
- SHA224Context sha224Context; SHA256Context sha256Context;
- SHA384Context sha384Context; SHA512Context sha512Context;
- } ctx;
-} USHAContext;
-
-/*
- * This structure will hold context information for the HMAC
- * keyed-hashing operation.
- */
-typedef struct HMACContext {
- int whichSha; /* which SHA is being used */
- int hashSize; /* hash size of SHA being used */
- int blockSize; /* block size of SHA being used */
- USHAContext shaContext; /* SHA context */
- unsigned char k_opad[USHA_Max_Message_Block_Size];
- /* outer padding - key XORd with opad */
- int Computed; /* Is the MAC computed? */
- int Corrupted; /* Cumulative corruption code */
-
-} HMACContext;
-
-/*
- * This structure will hold context information for the HKDF
- * extract-and-expand Key Derivation Functions.
- */
-typedef struct HKDFContext {
- int whichSha; /* which SHA is being used */
- HMACContext hmacContext;
- int hashSize; /* hash size of SHA being used */
- unsigned char prk[USHAMaxHashSize];
- /* pseudo-random key - output of hkdfInput */
- int Computed; /* Is the key material computed? */
- int Corrupted; /* Cumulative corruption code */
-} HKDFContext;
-
-/*
* Function Prototypes
*/
@@ -281,76 +238,6 @@ extern int SHA512FinalBits(SHA512Context
extern int SHA512Result(SHA512Context *,
uint8_t Message_Digest[SHA512HashSize]);
-/* Unified SHA functions, chosen by whichSha */
-extern int USHAReset(USHAContext *context, SHAversion whichSha);
-extern int USHAInput(USHAContext *context,
- const uint8_t *bytes, unsigned int bytecount);
-extern int USHAFinalBits(USHAContext *context,
- uint8_t bits, unsigned int bit_count);
-extern int USHAResult(USHAContext *context,
- uint8_t Message_Digest[USHAMaxHashSize]);
-extern int USHABlockSize(enum SHAversion whichSha);
-extern int USHAHashSize(enum SHAversion whichSha);
-extern int USHAHashSizeBits(enum SHAversion whichSha);
-extern const char *USHAHashName(enum SHAversion whichSha);
-
-/*
- * HMAC Keyed-Hashing for Message Authentication, RFC 2104,
- * for all SHAs.
- * This interface allows a fixed-length text input to be used.
- */
-extern int hmac(SHAversion whichSha, /* which SHA algorithm to use */
- const unsigned char *text, /* pointer to data stream */
- int text_len, /* length of data stream */
- const unsigned char *key, /* pointer to authentication key */
- int key_len, /* length of authentication key */
- uint8_t digest[USHAMaxHashSize]); /* caller digest to fill in */
-
-/*
- * HMAC Keyed-Hashing for Message Authentication, RFC 2104,
- * for all SHAs.
- * This interface allows any length of text input to be used.
- */
-extern int hmacReset(HMACContext *context, enum SHAversion whichSha,
- const unsigned char *key, int key_len);
-extern int hmacInput(HMACContext *context, const unsigned char *text,
- int text_len);
-extern int hmacFinalBits(HMACContext *context, uint8_t bits,
- unsigned int bit_count);
-extern int hmacResult(HMACContext *context,
- uint8_t digest[USHAMaxHashSize]);
-
-/*
- * HKDF HMAC-based Extract-and-Expand Key Derivation Function,
- * RFC 5869, for all SHAs.
- */
-extern int hkdf(SHAversion whichSha, const unsigned char *salt,
- int salt_len, const unsigned char *ikm, int ikm_len,
- const unsigned char *info, int info_len,
- uint8_t okm[ ], int okm_len);
-extern int hkdfExtract(SHAversion whichSha, const unsigned char *salt,
- int salt_len, const unsigned char *ikm,
- int ikm_len, uint8_t prk[USHAMaxHashSize]);
-extern int hkdfExpand(SHAversion whichSha, const uint8_t prk[ ],
- int prk_len, const unsigned char *info,
- int info_len, uint8_t okm[ ], int okm_len);
-
-/*
- * HKDF HMAC-based Extract-and-Expand Key Derivation Function,
- * RFC 5869, for all SHAs.
- * This interface allows any length of text input to be used.
- */
-extern int hkdfReset(HKDFContext *context, enum SHAversion whichSha,
- const unsigned char *salt, int salt_len);
-extern int hkdfInput(HKDFContext *context, const unsigned char *ikm,
- int ikm_len);
-extern int hkdfFinalBits(HKDFContext *context, uint8_t ikm_bits,
- unsigned int ikm_bit_count);
-extern int hkdfResult(HKDFContext *context,
- uint8_t prk[USHAMaxHashSize],
- const unsigned char *info, int info_len,
- uint8_t okm[USHAMaxHashSize], int okm_len);
-
/************************ sha-private.h ************************/
/***************** See RFC 6234 for details. *******************/
/*

View File

@@ -0,0 +1,22 @@
$NetBSD: patch-include_asterisk_strings.h,v 1.1.1.1 2015/12/05 23:29:10 jnemeth Exp $
--- include/asterisk/strings.h.orig 2015-10-09 21:48:48.000000000 +0000
+++ include/asterisk/strings.h
@@ -1159,7 +1159,7 @@ char *ast_tech_to_upper(char *dev_str),
}
for (pos = dev_str; *pos && *pos != '/'; pos++) {
- *pos = toupper(*pos);
+ *pos = toupper((unsigned char)*pos);
}
return dev_str;
}
@@ -1218,7 +1218,7 @@ static force_inline int attribute_pure a
int hash = 5381;
while (*str) {
- hash = hash * 33 ^ tolower(*str++);
+ hash = hash * 33 ^ tolower((unsigned char)*str++);
}
return abs(hash);

View File

@@ -0,0 +1,40 @@
$NetBSD: patch-main_Makefile,v 1.4 2016/07/24 06:35:50 jnemeth Exp $
--- main/Makefile.orig 2016-07-21 14:54:02.000000000 +0000
+++ main/Makefile
@@ -96,6 +96,10 @@ ifeq ($(OSARCH),OpenBSD)
AST_LIBS+=-lcrypto -lpthread -lm $(EDITLINE_LIB)
endif
+ifeq ($(OSARCH),dragonfly)
+ AST_LIBS+=-lpthread
+endif
+
ifeq ($(OSARCH),SunOS)
AST_LIBS+=-lpthread -ldl -lrt -lnsl -lsocket -lresolv
ASTSSL_LIBS+=-L/opt/ssl/lib -L/usr/local/ssl/lib
@@ -337,10 +341,10 @@ bininstall:
$(INSTALL) -m 755 $(MAIN_TGT) "$(DESTDIR)$(ASTSBINDIR)/"
ifeq ($(AST_ASTERISKSSL),yes)
ifeq ($(findstring darwin,$(OSARCH)),) # not Darwin
- $(INSTALL) -m 755 $(ASTSSL_LIB).$(ASTSSL_SO_VERSION) "$(DESTDIR)$(ASTLIBDIR)/"
- $(LN) -sf $(ASTSSL_LIB).$(ASTSSL_SO_VERSION) "$(DESTDIR)$(ASTLIBDIR)/$(ASTSSL_LIB)"
+ $(INSTALL) -m 755 $(ASTSSL_LIB).$(ASTSSL_SO_VERSION) "$(DESTDIR)$(PREFIX)/lib/"
+ $(LN) -sf $(ASTSSL_LIB).$(ASTSSL_SO_VERSION) "$(DESTDIR)$(PREFIX)/lib/$(ASTSSL_LIB)"
else # Darwin
- $(INSTALL) -m 755 $(ASTSSL_LIB) "$(DESTDIR)$(ASTLIBDIR)/"
+ $(INSTALL) -m 755 $(ASTSSL_LIB) "$(DESTDIR)$(PREFIX)/lib/"
endif
endif
ifeq ($(PJPROJECT_BUNDLED),yes)
@@ -365,9 +369,7 @@ endif
ifneq ($(ASTPJ_LIB).$(ASTPJ_SO_VERSION),.)
rm -f "$(DESTDIR)$(ASTLIBDIR)/$(ASTPJ_LIB).$(ASTPJ_SO_VERSION)"
endif
-ifneq ($(LDCONFIG),)
- $(LDCONFIG) $(LDCONFIG_FLAGS) "$(DESTDIR)$(ASTLIBDIR)/"
-endif
+ rm -f "$(DESTDIR)$(PREFIX)/lib/$(ASTSSL_LIB).$(ASTSSL_SO_VERSION)"
clean::
rm -f asterisk libasteriskssl.o

View File

@@ -0,0 +1,40 @@
$NetBSD: patch-main_acl.c,v 1.1.1.1 2015/12/05 23:29:10 jnemeth Exp $
--- main/acl.c.orig 2015-10-09 21:48:48.000000000 +0000
+++ main/acl.c
@@ -127,7 +127,7 @@ static int get_local_address(struct ast_
char *buf = NULL;
int bufsz, x;
#endif /* SOLARIS */
-#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__linux__) || defined(__Darwin__) || defined(__GLIBC__)
+#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__linux__) || defined(__Darwin__) || defined(__DragonFly__) || defined(__GLIBC__)
struct ifaddrs *ifap, *ifaphead;
int rtnerr;
const struct sockaddr_in *sin;
@@ -136,7 +136,7 @@ static int get_local_address(struct ast_
int best_score = -100;
memset(&best_addr, 0, sizeof(best_addr));
-#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__linux__) || defined(__Darwin__) || defined(__GLIBC__)
+#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__linux__) || defined(__Darwin__) || defined(__DragonFly__) || defined(__GLIBC__)
rtnerr = getifaddrs(&ifaphead);
if (rtnerr) {
perror(NULL);
@@ -147,7 +147,7 @@ static int get_local_address(struct ast_
s = socket(AF_INET, SOCK_STREAM, 0);
if (s > 0) {
-#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__linux__) || defined(__Darwin__) || defined(__GLIBC__)
+#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__linux__) || defined(__Darwin__) || defined(__DragonFly__) || defined(__GLIBC__)
for (ifap = ifaphead; ifap; ifap = ifap->ifa_next) {
if (ifap->ifa_addr && ifap->ifa_addr->sa_family == AF_INET) {
@@ -206,7 +206,7 @@ static int get_local_address(struct ast_
close(s);
}
-#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__linux__) || defined(__Darwin__)
+#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__linux__) || defined(__Darwin__) || defined(__DragonFly__)
freeifaddrs(ifaphead);
#endif /* BSD_OR_LINUX */

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-main_asterisk.c,v 1.1.1.1 2015/12/05 23:29:10 jnemeth Exp $
--- main/asterisk.c.orig 2015-10-09 21:48:48.000000000 +0000
+++ main/asterisk.c
@@ -172,7 +172,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revisi
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/vmmeter.h>
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__DragonFly__)
#include <vm/vm_param.h>
#endif
#if defined(HAVE_SWAPCTL)

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-main_astmm.c,v 1.1.1.1 2015/12/05 23:29:10 jnemeth Exp $
--- main/astmm.c.orig 2015-10-09 21:48:48.000000000 +0000
+++ main/astmm.c
@@ -1487,7 +1487,7 @@ void __ast_mm_init_phase_2(void)
mmlog = fopen(filename, "a+");
if (mmlog) {
- fprintf(mmlog, "%ld - New session\n", (long) time(NULL));
+ fprintf(mmlog, "%jd - New session\n", (intmax_t) time(NULL));
fflush(mmlog);
} else {
ast_log(LOG_ERROR, "Could not open malloc debug log file: %s\n", filename);

View File

@@ -0,0 +1,25 @@
$NetBSD: patch-main_cdr.c,v 1.1.1.1 2015/12/05 23:29:10 jnemeth Exp $
--- main/cdr.c.orig 2015-10-09 21:48:48.000000000 +0000
+++ main/cdr.c
@@ -2787,7 +2787,7 @@ static const char *cdr_format_var_intern
static void cdr_get_tv(struct timeval when, const char *fmt, char *buf, int bufsize)
{
if (fmt == NULL) { /* raw mode */
- snprintf(buf, bufsize, "%ld.%06ld", (long)when.tv_sec, (long)when.tv_usec);
+ snprintf(buf, bufsize, "%jd.%06ld", (intmax_t)when.tv_sec, (long)when.tv_usec);
} else {
buf[0] = '\0';/* Ensure the buffer is initialized. */
if (when.tv_sec) {
@@ -2833,9 +2833,9 @@ void ast_cdr_format_var(struct ast_cdr *
} else if (!strcasecmp(name, "end")) {
cdr_get_tv(cdr->end, raw ? NULL : fmt, workspace, workspacelen);
} else if (!strcasecmp(name, "duration")) {
- snprintf(workspace, workspacelen, "%ld", cdr->end.tv_sec != 0 ? cdr->duration : (long)ast_tvdiff_ms(ast_tvnow(), cdr->start) / 1000);
+ snprintf(workspace, workspacelen, "%jd", cdr->end.tv_sec != 0 ? cdr->duration : (intmax_t)ast_tvdiff_ms(ast_tvnow(), cdr->start) / 1000);
} else if (!strcasecmp(name, "billsec")) {
- snprintf(workspace, workspacelen, "%ld", (cdr->billsec || !ast_tvzero(cdr->end) || ast_tvzero(cdr->answer)) ? cdr->billsec : (long)ast_tvdiff_ms(ast_tvnow(), cdr->answer) / 1000);
+ snprintf(workspace, workspacelen, "%jd", (cdr->billsec || !ast_tvzero(cdr->end) || ast_tvzero(cdr->answer)) ? cdr->billsec : (intmax_t)ast_tvdiff_ms(ast_tvnow(), cdr->answer) / 1000);
} else if (!strcasecmp(name, "disposition")) {
if (raw) {
snprintf(workspace, workspacelen, "%ld", cdr->disposition);

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-main_cel.c,v 1.1.1.1 2015/12/05 23:29:10 jnemeth Exp $
--- main/cel.c.orig 2015-10-09 21:48:48.000000000 +0000
+++ main/cel.c
@@ -790,7 +790,7 @@ struct ast_channel *ast_cel_fabricate_ch
}
if (ast_strlen_zero(cfg->general->date_format)) {
- snprintf(timebuf, sizeof(timebuf), "%ld.%06ld", (long) record.event_time.tv_sec,
+ snprintf(timebuf, sizeof(timebuf), "%jd.%06ld", (intmax_t) record.event_time.tv_sec,
(long) record.event_time.tv_usec);
} else {
struct ast_tm tm;

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-main_http.c,v 1.1.1.1 2015/12/05 23:29:10 jnemeth Exp $
--- main/http.c.orig 2015-10-09 21:48:48.000000000 +0000
+++ main/http.c
@@ -304,7 +304,7 @@ static int static_callback(struct ast_tc
}
/* make "Etag:" http header value */
- snprintf(etag, sizeof(etag), "\"%ld\"", (long)st.st_mtime);
+ snprintf(etag, sizeof(etag), "\"%jd\"", (intmax_t)st.st_mtime);
/* make "Last-Modified:" http header value */
tv.tv_sec = st.st_mtime;

View File

@@ -0,0 +1,22 @@
$NetBSD: patch-main_logger.c,v 1.1.1.1 2015/12/05 23:29:10 jnemeth Exp $
--- main/logger.c.orig 2015-10-09 21:48:48.000000000 +0000
+++ main/logger.c
@@ -674,7 +674,7 @@ void ast_queue_log(const char *queuename
if (qlog) {
va_start(ap, fmt);
- qlog_len = snprintf(qlog_msg, sizeof(qlog_msg), "%ld|%s|%s|%s|%s|", (long)time(NULL), callid, queuename, agent, event);
+ qlog_len = snprintf(qlog_msg, sizeof(qlog_msg), "%jd|%s|%s|%s|%s|", (intmax_t)time(NULL), callid, queuename, agent, event);
vsnprintf(qlog_msg + qlog_len, sizeof(qlog_msg) - qlog_len, fmt, ap);
va_end(ap);
AST_RWLIST_RDLOCK(&logchannels);
@@ -714,7 +714,7 @@ static int rotate_file(const char *filen
}
break;
case TIMESTAMP:
- snprintf(new, sizeof(new), "%s.%ld", filename, (long)time(NULL));
+ snprintf(new, sizeof(new), "%s.%jd", filename, (intmax_t)time(NULL));
if (rename(filename, new)) {
fprintf(stderr, "Unable to rename file '%s' to '%s'\n", filename, new);
res = -1;

View File

@@ -0,0 +1,65 @@
$NetBSD: patch-main_manager.c,v 1.2 2016/07/24 06:35:50 jnemeth Exp $
--- main/manager.c.orig 2016-07-21 14:54:02.000000000 +0000
+++ main/manager.c
@@ -2492,7 +2492,7 @@ static char *handle_showmanconn(struct a
struct mansession_session *session;
time_t now = time(NULL);
#define HSMCONN_FORMAT1 " %-15.15s %-55.55s %-10.10s %-10.10s %-8.8s %-8.8s %-5.5s %-5.5s\n"
-#define HSMCONN_FORMAT2 " %-15.15s %-55.55s %-10d %-10d %-8d %-8d %-5.5d %-5.5d\n"
+#define HSMCONN_FORMAT2 " %-15.15s %-55.55s %-10jd %-10jd %-8d %-8d %-5.5d %-5.5d\n"
int count = 0;
struct ao2_iterator i;
@@ -2518,8 +2518,8 @@ static char *handle_showmanconn(struct a
ao2_lock(session);
ast_cli(a->fd, HSMCONN_FORMAT2, session->username,
ast_sockaddr_stringify_addr(&session->addr),
- (int) (session->sessionstart),
- (int) (now - session->sessionstart),
+ (intmax_t) (session->sessionstart),
+ (intmax_t) (now - session->sessionstart),
session->fd,
session->inuse,
session->readperm,
@@ -3359,9 +3359,9 @@ static int action_ping(struct mansession
astman_append(
s,
"Ping: Pong\r\n"
- "Timestamp: %ld.%06lu\r\n"
+ "Timestamp: %jd.%06lu\r\n"
"\r\n",
- (long) now.tv_sec, (unsigned long) now.tv_usec);
+ (intmax_t) now.tv_sec, (unsigned long) now.tv_usec);
return 0;
}
@@ -4492,7 +4492,7 @@ static int action_status(struct mansessi
"DNID: %s\r\n"
"EffectiveConnectedLineNum: %s\r\n"
"EffectiveConnectedLineName: %s\r\n"
- "TimeToHangup: %ld\r\n"
+ "TimeToHangup: %jd\r\n"
"BridgeID: %s\r\n"
"Linkedid: %s\r\n"
"Application: %s\r\n"
@@ -4524,7 +4524,7 @@ static int action_status(struct mansessi
S_OR(ast_channel_dialed(chan)->number.str, ""),
S_COR(ast_channel_connected_effective_id(chan).number.valid, ast_channel_connected_effective_id(chan).number.str, "<unknown>"),
S_COR(ast_channel_connected_effective_id(chan).name.valid, ast_channel_connected_effective_id(chan).name.str, "<unknown>"),
- (long)ast_channel_whentohangup(chan)->tv_sec,
+ (intmax_t)ast_channel_whentohangup(chan)->tv_sec,
bridge ? bridge->uniqueid : "",
ast_channel_linkedid(chan),
ast_channel_appl(chan),
@@ -6700,8 +6700,8 @@ static int __attribute__((format(printf,
if (timestampevents) {
now = ast_tvnow();
ast_str_append(&buf, 0,
- "Timestamp: %ld.%06lu\r\n",
- (long)now.tv_sec, (unsigned long) now.tv_usec);
+ "Timestamp: %jd.%06lu\r\n",
+ (intmax_t)now.tv_sec, (unsigned long) now.tv_usec);
}
if (manager_debug) {
static int seq;

View File

@@ -0,0 +1,11 @@
$NetBSD: patch-main_netsock.c,v 1.1.1.1 2015/12/05 23:29:10 jnemeth Exp $
--- main/netsock.c.orig 2015-10-09 21:48:48.000000000 +0000
+++ main/netsock.c
@@ -35,5 +35,5 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revisi
#ifndef __linux__
-#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__Darwin__) || defined(__GLIBC__)
+#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__Darwin__) || defined(__DragonFly__) || defined(__GLIBC__)
#include <net/if_dl.h>
#endif

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-main_pbx.c,v 1.2 2016/05/06 07:41:06 jnemeth Exp $
--- main/pbx.c.orig 2016-04-20 10:46:18.000000000 +0000
+++ main/pbx.c
@@ -7973,7 +7973,7 @@ static int testtime_write(struct ast_cha
sscanf(remainder, "%79s", timezone);
tv = ast_mktime(&tm, S_OR(timezone, NULL));
- snprintf(result, sizeof(result), "%ld", (long) tv.tv_sec);
+ snprintf(result, sizeof(result), "%jd", (intmax_t) tv.tv_sec);
pbx_builtin_setvar_helper(chan, "__TESTTIME", result);
return 0;
}

View File

@@ -0,0 +1,24 @@
$NetBSD: patch-main_pbx__builtins.c,v 1.1 2016/05/06 07:41:06 jnemeth Exp $
--- main/pbx_builtins.c.orig 2016-05-06 02:38:17.000000000 +0000
+++ main/pbx_builtins.c
@@ -843,7 +843,7 @@ static int pbx_builtin_gotoiftime(struct
struct ast_timing timing;
const char *ctime;
struct timeval tv = ast_tvnow();
- long timesecs;
+ int64_t timesecs;
if (!chan) {
ast_log(LOG_WARNING, "GotoIfTime requires a channel on which to operate\n");
@@ -858,8 +858,8 @@ static int pbx_builtin_gotoiftime(struct
ts = s = ast_strdupa(data);
ast_channel_lock(chan);
- if ((ctime = pbx_builtin_getvar_helper(chan, "TESTTIME")) && sscanf(ctime, "%ld", &timesecs) == 1) {
- tv.tv_sec = timesecs;
+ if ((ctime = pbx_builtin_getvar_helper(chan, "TESTTIME")) && sscanf(ctime, "%" SCNd64, &timesecs) == 1) {
+ tv.tv_sec = (time_t)timesecs;
} else if (ctime) {
ast_log(LOG_WARNING, "Using current time to evaluate\n");
/* Reset when unparseable */

View File

@@ -0,0 +1,27 @@
$NetBSD: patch-main_sched.c,v 1.2 2016/02/07 09:13:34 jnemeth Exp $
--- main/sched.c.orig 2016-02-05 20:32:40.000000000 +0000
+++ main/sched.c
@@ -468,7 +468,7 @@ static int sched_settime(struct timeval
ast_assert(0);
}
- /*ast_debug(1, "TV -> %lu,%lu\n", tv->tv_sec, tv->tv_usec);*/
+ /*ast_debug(1, "TV -> %jd,%lu\n", (intmax_t)tv->tv_sec, tv->tv_usec);*/
if (ast_tvzero(*t)) /* not supplied, default to now */
*t = now;
*t = ast_tvadd(*t, ast_samp2tv(when, 1000));
@@ -696,11 +696,11 @@ void ast_sched_dump(struct ast_sched_con
struct timeval delta;
q = ast_heap_peek(con->sched_heap, x);
delta = ast_tvsub(q->when, when);
- ast_debug(1, "|%.4d | %-15p | %-15p | %.6ld : %.6ld |\n",
+ ast_debug(1, "|%.4d | %-15p | %-15p | %.6jd : %.6ld |\n",
q->sched_id->id,
q->callback,
q->data,
- (long)delta.tv_sec,
+ (intmax_t)delta.tv_sec,
(long int)delta.tv_usec);
}
ast_mutex_unlock(&con->lock);

View File

@@ -0,0 +1,112 @@
$NetBSD: patch-main_stdtime_localtime.c,v 1.1.1.1 2015/12/05 23:29:10 jnemeth Exp $
--- main/stdtime/localtime.c.orig 2015-10-09 21:48:48.000000000 +0000
+++ main/stdtime/localtime.c
@@ -67,6 +67,10 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revisi
#include <sys/stat.h>
#include <fcntl.h>
#endif
+#ifdef __sun
+#include <time.h>
+#include <xlocale.h>
+#endif
#include "private.h"
#include "tzfile.h"
@@ -733,7 +737,7 @@ static void *notify_daemon(void *data)
if (st.st_mtime > cur->mtime[0] || lst.st_mtime > cur->mtime[1]) {
#ifdef TEST_FRAMEWORK
if (test) {
- ast_test_status_update(test, "Removing cached TZ entry '%s' because underlying file changed. (%ld != %ld) or (%ld != %ld)\n", name, st.st_mtime, cur->mtime[0], lst.st_mtime, cur->mtime[1]);
+ ast_test_status_update(test, "Removing cached TZ entry '%s' because underlying file changed. (%jd != %jd) or (%jd != %jd)\n", name, (intmax_t)st.st_mtime, (intmax_t)cur->mtime[0], (intmax_t)lst.st_mtime, (intmax_t)cur->mtime[1]);
} else
#endif
{
@@ -2417,6 +2421,23 @@ static struct locale_entry *find_by_name
return NULL;
}
+#if HAVE_STRFTIME_L || HAVE_STRPTIME_L
+static locale_t ast_getlocale(const char *locale)
+{
+ struct locale_entry *cur;
+
+ AST_LIST_LOCK(&localelist);
+ if ((cur = find_by_name(locale)) == NULL) {
+ cur->locale = newlocale(LC_ALL_MASK, locale, NULL);
+ strcpy(cur->name, locale); /* SAFE */
+ AST_LIST_INSERT_TAIL(&localelist, cur, list);
+ }
+ AST_LIST_UNLOCK(&localelist);
+ return cur->locale;
+}
+#endif
+
+#if !HAVE_STRFTIME_L || !HAVE_STRPTIME_L
static const char *store_by_locale(locale_t prevlocale)
{
struct locale_entry *cur;
@@ -2474,6 +2495,7 @@ const char *ast_setlocale(const char *lo
AST_LIST_UNLOCK(&localelist);
return store_by_locale(prevlocale);
}
+#endif
#else
const char *ast_setlocale(const char *unused)
{
@@ -2487,7 +2509,9 @@ int ast_strftime_locale(char *buf, size_
char *format = ast_calloc(1, fmtlen), *fptr = format, *newfmt;
int decimals = -1, i, res;
long fraction;
+#if !HAVE_STRFTIME_L
const char *prevlocale;
+#endif
buf[0] = '\0';/* Ensure the buffer is initialized. */
if (!format) {
@@ -2542,6 +2566,14 @@ defcase: *fptr++ = *tmp;
}
*fptr = '\0';
#undef strftime
+#if HAVE_STRFTIME_L
+ if (locale) {
+ locale_t l = ast_getlocale(locale);
+ res = (int)strftime_l(buf, len, format, (struct tm *)tm, l);
+ } else {
+ res = (int)strftime(buf, len, format, (struct tm *)tm);
+ }
+#else
if (locale) {
prevlocale = ast_setlocale(locale);
}
@@ -2549,6 +2581,7 @@ defcase: *fptr++ = *tmp;
if (locale) {
ast_setlocale(prevlocale);
}
+#endif
ast_free(format);
return res;
}
@@ -2562,11 +2595,22 @@ char *ast_strptime_locale(const char *s,
{
struct tm tm2 = { 0, };
char *res;
+#if !HAVE_STRPTIME_L
const char *prevlocale;
+#endif
+#if HAVE_STRPTIME_L
+ if (locale) {
+ locale_t l = ast_getlocale(locale);
+ res = strptime_l(s, format, &tm2, l);
+ } else {
+ res = strptime(s, format, &tm2);
+ }
+#else
prevlocale = ast_setlocale(locale);
res = strptime(s, format, &tm2);
ast_setlocale(prevlocale);
+#endif
/* ast_time and tm are not the same size - tm is a subset of
* ast_time. Hence, the size of tm needs to be used for the
* memcpy

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-main_test.c,v 1.1.1.1 2015/12/05 23:29:10 jnemeth Exp $
--- main/test.c.orig 2015-10-09 21:48:48.000000000 +0000
+++ main/test.c
@@ -975,7 +975,7 @@ static char *test_cli_generate_results(s
if (!(buf = ast_str_create(256))) {
return NULL;
}
- ast_str_set(&buf, 0, "%s/asterisk_test_results-%ld.%s", ast_config_AST_LOG_DIR, (long) time.tv_sec, type);
+ ast_str_set(&buf, 0, "%s/asterisk_test_results-%jd.%s", ast_config_AST_LOG_DIR, (intmax_t) time.tv_sec, type);
file = ast_str_buffer(buf);
}

View File

@@ -0,0 +1,42 @@
$NetBSD: patch-main_utils.c,v 1.1.1.1 2015/12/05 23:29:10 jnemeth Exp $
--- main/utils.c.orig 2015-10-09 21:48:48.000000000 +0000
+++ main/utils.c
@@ -41,6 +41,10 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revisi
#elif defined(HAVE_SYS_THR_H)
#include <sys/thr.h>
#endif
+#if defined(HAVE_GETIFADDRS)
+#include <ifaddrs.h>
+#include <net/if_dl.h>
+#endif
#include "asterisk/network.h"
#include "asterisk/ast_version.h"
@@ -618,7 +622,7 @@ const char *ast_inet_ntoa(struct in_addr
static int dev_urandom_fd = -1;
-#ifndef __linux__
+#if !defined(__linux__) && !defined(__DragonFly__)
#undef pthread_create /* For ast_pthread_create function only */
#endif /* !__linux__ */
@@ -1846,13 +1850,13 @@ int ast_false(const char *s)
static struct timeval tvfix(struct timeval a)
{
if (a.tv_usec >= ONE_MILLION) {
- ast_log(LOG_WARNING, "warning too large timestamp %ld.%ld\n",
- (long)a.tv_sec, (long int) a.tv_usec);
+ ast_log(LOG_WARNING, "warning too large timestamp %jd.%ld\n",
+ (intmax_t)a.tv_sec, (long int) a.tv_usec);
a.tv_sec += a.tv_usec / ONE_MILLION;
a.tv_usec %= ONE_MILLION;
} else if (a.tv_usec < 0) {
- ast_log(LOG_WARNING, "warning negative timestamp %ld.%ld\n",
- (long)a.tv_sec, (long int) a.tv_usec);
+ ast_log(LOG_WARNING, "warning negative timestamp %jd.%ld\n",
+ (intmax_t)a.tv_sec, (long int) a.tv_usec);
a.tv_usec = 0;
}
return a;

View File

@@ -0,0 +1,40 @@
$NetBSD: patch-pbx_pbx__dundi.c,v 1.1.1.1 2015/12/05 23:29:10 jnemeth Exp $
--- pbx/pbx_dundi.c.orig 2015-10-09 21:48:48.000000000 +0000
+++ pbx/pbx_dundi.c
@@ -47,7 +47,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revisi
#include <pthread.h>
#include <net/if.h>
-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__Darwin__)
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__Darwin__) || defined(__DragonFly__)
#include <net/if_dl.h>
#include <ifaddrs.h>
#include <signal.h>
@@ -885,7 +885,7 @@ static int cache_save_hint(dundi_eid *ei
time(&timeout);
timeout += expiration;
- snprintf(data, sizeof(data), "%ld|", (long)(timeout));
+ snprintf(data, sizeof(data), "%jd|", (intmax_t)(timeout));
ast_db_put("dundi/cache", key1, data);
ast_debug(1, "Caching hint at '%s'\n", key1);
@@ -921,7 +921,7 @@ static int cache_save(dundi_eid *eidpeer
/* Build request string */
time(&timeout);
timeout += expiration;
- snprintf(data, sizeof(data), "%ld|", (long)(timeout));
+ snprintf(data, sizeof(data), "%jd|", (intmax_t)(timeout));
for (x=start;x<req->respcount;x++) {
/* Skip anything with an illegal pipe in it */
if (strchr(req->dr[x].dest, '|'))
@@ -2166,7 +2166,7 @@ static void check_password(void)
time(&now);
#if 0
- printf("%ld/%ld\n", now, rotatetime);
+ printf("%jd/%jd\n", now, rotatetime);
#endif
if ((now - rotatetime) >= 0) {
/* Time to rotate keys */

View File

@@ -0,0 +1,37 @@
$NetBSD: patch-res_res__calendar.c,v 1.1.1.1 2015/12/05 23:29:10 jnemeth Exp $
--- res/res_calendar.c.orig 2015-10-09 21:48:48.000000000 +0000
+++ res/res_calendar.c
@@ -1245,7 +1245,7 @@ static int calendar_query_exec(struct as
i = ao2_iterator_init(cal->events, 0);
while ((event = ao2_iterator_next(&i))) {
if (!(start > event->end || end < event->start)) {
- ast_debug(10, "%s (%ld - %ld) overlapped with (%ld - %ld)\n", event->summary, (long) event->start, (long) event->end, (long) start, (long) end);
+ ast_debug(10, "%s (%jd - %jd) overlapped with (%jd - %jd)\n", event->summary, (intmax_t) event->start, (intmax_t) event->end, (intmax_t) start, (intmax_t) end);
if (add_event_to_list(events, event, start, end) < 0) {
event = ast_calendar_unref_event(event);
cal = unref_calendar(cal);
@@ -1378,9 +1378,9 @@ static int calendar_query_result_exec(st
} else if (!strcasecmp(args.field, "uid")) {
ast_copy_string(buf, entry->event->uid, len);
} else if (!strcasecmp(args.field, "start")) {
- snprintf(buf, len, "%ld", (long) entry->event->start);
+ snprintf(buf, len, "%jd", (intmax_t) entry->event->start);
} else if (!strcasecmp(args.field, "end")) {
- snprintf(buf, len, "%ld", (long) entry->event->end);
+ snprintf(buf, len, "%jd", (intmax_t) entry->event->end);
} else if (!strcasecmp(args.field, "busystate")) {
snprintf(buf, len, "%u", entry->event->busy_state);
} else if (!strcasecmp(args.field, "attendees")) {
@@ -1739,9 +1739,9 @@ static int calendar_event_read(struct as
} else if (!strcasecmp(data, "uid")) {
ast_copy_string(buf, event->uid, len);
} else if (!strcasecmp(data, "start")) {
- snprintf(buf, len, "%ld", (long)event->start);
+ snprintf(buf, len, "%jd", (intmax_t)event->start);
} else if (!strcasecmp(data, "end")) {
- snprintf(buf, len, "%ld", (long)event->end);
+ snprintf(buf, len, "%jd", (intmax_t)event->end);
} else if (!strcasecmp(data, "busystate")) {
snprintf(buf, len, "%u", event->busy_state);
} else if (!strcasecmp(data, "attendees")) {

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-res_res__calendar__caldav.c,v 1.1.1.1 2015/12/05 23:29:10 jnemeth Exp $
--- res/res_calendar_caldav.c.orig 2015-10-09 21:48:48.000000000 +0000
+++ res/res_calendar_caldav.c
@@ -404,7 +404,7 @@ static void caldav_add_event(icalcompone
ast_string_field_set(event, uid, event->summary);
} else {
char tmp[100];
- snprintf(tmp, sizeof(tmp), "%ld", event->start);
+ snprintf(tmp, sizeof(tmp), "%jd", (intmax_t)event->start);
ast_string_field_set(event, uid, tmp);
}
}

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-res_res__calendar__icalendar.c,v 1.1.1.1 2015/12/05 23:29:10 jnemeth Exp $
--- res/res_calendar_icalendar.c.orig 2015-10-09 21:48:48.000000000 +0000
+++ res/res_calendar_icalendar.c
@@ -246,7 +246,7 @@ static void icalendar_add_event(icalcomp
ast_string_field_set(event, uid, event->summary);
} else {
char tmp[100];
- snprintf(tmp, sizeof(tmp), "%ld", event->start);
+ snprintf(tmp, sizeof(tmp), "%jd", (intmax_t)event->start);
ast_string_field_set(event, uid, tmp);
}
}

View File

@@ -0,0 +1,25 @@
$NetBSD: patch-sounds_Makefile,v 1.1.1.1 2015/12/05 23:29:10 jnemeth Exp $
--- sounds/Makefile.orig 2015-10-09 21:48:48.000000000 +0000
+++ sounds/Makefile
@@ -123,20 +123,6 @@ endef # sound_format_lang_rule
all: $(CORE_SOUNDS) $(EXTRA_SOUNDS) $(MOH)
have_download:
- @if test "$(DOWNLOAD)" = ":" ; then \
- echo "**************************************************"; \
- echo "*** ***"; \
- echo "*** You must have either wget or fetch to be ***"; \
- echo "*** able to automatically download and install ***"; \
- echo "*** the requested sound packages. ***"; \
- echo "*** ***"; \
- echo "*** Please install one of these, or remove any ***"; \
- echo "*** extra sound package selections in ***"; \
- echo "*** menuselect before installing Asterisk. ***"; \
- echo "*** ***"; \
- echo "**************************************************"; \
- exit 1; \
- fi
$(eval $(call sound_format_lang_rule,$(SOUNDS_DIR),core-sounds,en,$(CORE_SOUNDS_VERSION)))

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-tests_test__locale.c,v 1.1.1.1 2015/12/05 23:29:10 jnemeth Exp $
--- tests/test_locale.c.orig 2015-10-09 21:48:48.000000000 +0000
+++ tests/test_locale.c
@@ -81,7 +81,7 @@ static char *handle_cli_test_locales(str
/* First we run a set of tests with the global locale, which isn't thread-safe. */
if (!(localedir = opendir(
-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined( __NetBSD__ ) || defined(__APPLE__)
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined( __NetBSD__ ) || defined(__APPLE__) || defined(__DragonFly__)
"/usr/share/locale"
#else /* Linux */
"/usr/lib/locale"

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-tests_test__voicemail__api.c,v 1.1.1.1 2015/12/05 23:29:10 jnemeth Exp $
--- tests/test_voicemail_api.c.orig 2015-10-09 21:48:48.000000000 +0000
+++ tests/test_voicemail_api.c
@@ -383,7 +383,7 @@ static struct ast_vm_msg_snapshot *test_
struct ast_vm_msg_snapshot *snapshot;
snprintf(msg_id_hash, sizeof(msg_id_hash), "%s%s%s", exten, context, callerid);
- snprintf(msg_id_buf, sizeof(msg_id_buf), "%ld-%d", (long)time(NULL), ast_str_hash(msg_id_hash));
+ snprintf(msg_id_buf, sizeof(msg_id_buf), "%jd-%d", (intmax_t)time(NULL), ast_str_hash(msg_id_hash));
if ((snapshot = ast_calloc(1, sizeof(*snapshot)))) {
if (ast_string_field_init(snapshot, 128)) {

View File

@@ -0,0 +1,24 @@
$NetBSD: patch-utils_Makefile,v 1.1.1.1 2015/12/05 23:29:10 jnemeth Exp $
--- utils/Makefile.orig 2015-10-09 21:48:48.000000000 +0000
+++ utils/Makefile
@@ -41,6 +41,10 @@ ifeq ($(OSARCH),SunOS)
UTILS:=$(filter-out muted,$(UTILS))
endif
+ifeq ($(OSARCH),NetBSD)
+ UTILS:=$(filter-out muted,$(UTILS))
+endif
+
ifeq ($(OSARCH),OpenBSD)
UTILS:=$(filter-out muted,$(UTILS))
endif
@@ -75,7 +79,7 @@ all: $(UTILS)
install:
for x in $(UTILS); do \
if [ "$$x" != "none" ]; then \
- $(INSTALL) -m 755 $$x "$(DESTDIR)$(ASTSBINDIR)/$$x"; \
+ $(BSD_INSTALL_PROGRAM) -m 755 $$x "$(DESTDIR)$(ASTSBINDIR)/$$x"; \
fi; \
done

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-utils_db1-ast_include_db.h,v 1.1.1.1 2015/12/05 23:29:10 jnemeth Exp $
--- utils/db1-ast/include/db.h.orig 2015-10-09 21:48:48.000000000 +0000
+++ utils/db1-ast/include/db.h
@@ -55,7 +55,7 @@
#ifndef __BIT_TYPES_DEFINED__
#define __BIT_TYPES_DEFINED__
-#if (!defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__APPLE__))
+#if (!defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__APPLE__) && !defined(__DragonFly__))
typedef __signed char int8_t;
typedef short int16_t;
typedef int int32_t;

View File

@@ -0,0 +1,67 @@
$NetBSD: patch-utils_extconf.c,v 1.1.1.1 2015/12/05 23:29:10 jnemeth Exp $
--- utils/extconf.c.orig 2015-10-09 21:48:48.000000000 +0000
+++ utils/extconf.c
@@ -593,6 +593,10 @@ static void __attribute__((destructor))
#include "libkern/OSAtomic.h"
#endif
+#if defined(HAVE_SYS_ATOMIC_H)
+#include <sys/atomic.h>
+#endif
+
/*! \brief Atomically add v to *p and return * the previous value of *p.
* This can be used to handle reference counts, and the return value
* can be used to generate unique identifiers.
@@ -606,12 +610,18 @@ AST_INLINE_API(int ast_atomic_fetchadd_i
#elif defined(HAVE_OSX_ATOMICS) && (SIZEOF_INT == 4)
AST_INLINE_API(int ast_atomic_fetchadd_int(volatile int *p, int v),
{
- return OSAtomicAdd32(v, (int32_t *) p);
+ return OSAtomicAdd32(v, (int32_t *) p) - v;
})
#elif defined(HAVE_OSX_ATOMICS) && (SIZEOF_INT == 8)
AST_INLINE_API(int ast_atomic_fetchadd_int(volatile int *p, int v),
{
- return OSAtomicAdd64(v, (int64_t *) p);
+ return OSAtomicAdd64(v, (int64_t *) p) - v;
+})
+#elif defined(HAVE_SYS_ATOMIC_H)
+AST_INLINE_API(int ast_atomic_fetchadd_int(volatile int *p, int v),
+{
+ return atomic_add_int_nv((unsigned int *)p, v) - v;
+})
#elif defined (__i386__) || defined(__x86_64__)
AST_INLINE_API(int ast_atomic_fetchadd_int(volatile int *p, int v),
{
@@ -653,6 +663,12 @@ AST_INLINE_API(int ast_atomic_dec_and_te
AST_INLINE_API(int ast_atomic_dec_and_test(volatile int *p),
{
return OSAtomicAdd64( -1, (int64_t *) p) == 0;
+})
+#elif defined(HAVE_SYS_ATOMIC_H)
+AST_INLINE_API(int ast_atomic_dec_and_test(volatile int *p),
+{
+ return atomic_dec_uint_nv((unsigned int *)p) == 0;
+})
#else
AST_INLINE_API(int ast_atomic_dec_and_test(volatile int *p),
{
@@ -2537,13 +2553,13 @@ static int ast_true(const char *s)
static struct timeval tvfix(struct timeval a)
{
if (a.tv_usec >= ONE_MILLION) {
- ast_log(LOG_WARNING, "warning too large timestamp %ld.%ld\n",
- (long)a.tv_sec, (long int) a.tv_usec);
+ ast_log(LOG_WARNING, "warning too large timestamp %jd.%ld\n",
+ (intmax_t)a.tv_sec, (long int) a.tv_usec);
a.tv_sec += a.tv_usec / ONE_MILLION;
a.tv_usec %= ONE_MILLION;
} else if (a.tv_usec < 0) {
- ast_log(LOG_WARNING, "warning negative timestamp %ld.%ld\n",
- (long)a.tv_sec, (long int) a.tv_usec);
+ ast_log(LOG_WARNING, "warning negative timestamp %jd.%ld\n",
+ (intmax_t)a.tv_sec, (long int) a.tv_usec);
a.tv_usec = 0;
}
return a;

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-utils_smsq.c,v 1.1.1.1 2015/12/05 23:29:10 jnemeth Exp $
--- utils/smsq.c.orig 2015-10-09 21:48:48.000000000 +0000
+++ utils/smsq.c
@@ -687,7 +687,7 @@ main (int argc, const char *argv[])
snprintf (temp, sizeof(temp), "sms/.smsq-%d", (int)getpid ());
mkdir ("sms", 0777); /* ensure directory exists */
mkdir (dir, 0777); /* ensure directory exists */
- snprintf (queuename, sizeof(queuename), "%s/%s.%ld-%d", dir, *queue ? queue : "0", (long)time (0), (int)getpid ());
+ snprintf (queuename, sizeof(queuename), "%s/%s.%jd-%d", dir, *queue ? queue : "0", (intmax_t)time (0), (int)getpid ());
f = fopen (temp, "w");
if (!f)
{

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-utils_streamplayer.c,v 1.1.1.1 2015/12/05 23:29:10 jnemeth Exp $
--- utils/streamplayer.c.orig 2015-10-09 21:48:48.000000000 +0000
+++ utils/streamplayer.c
@@ -53,7 +53,7 @@
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__Darwin__) || defined(__CYGWIN__)
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__Darwin__) || defined(__CYGWIN__) || defined(__DragonFly__)
#include <netinet/in.h>
#endif
#include <sys/time.h>

View File

@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.99 2015/08/18 07:31:03 wiz Exp $
# $NetBSD: Makefile,v 1.108 2016/08/03 10:22:35 adam Exp $
#
# NOTE: when updating this package, there are two places that sound
# tarballs need to be checked
@@ -7,7 +7,7 @@ DISTNAME= asterisk-1.8.32.3
DIST_SUBDIR= ${PKGNAME_NOREV}
DISTFILES= ${DEFAULT_DISTFILES}
EXTRACT_ONLY= ${DISTNAME}.tar.gz
PKGREVISION= 5
PKGREVISION= 10
CATEGORIES= comms net audio
MASTER_SITES= http://downloads.asterisk.org/pub/telephony/asterisk/ \
http://downloads.asterisk.org/pub/telephony/asterisk/old-releases/ \
@@ -96,17 +96,23 @@ BUILDLINK_TRANSFORM+= rm:-march=i386
.endif
PLIST_VARS+= kqueue
.if exists(/usr/include/sys/event.h)
.for dir in ${COMPILER_INCLUDE_DIRS}
. if exists(${dir}/sys/event.h)
PLIST.kqueue= yes
.endif
. endif
.endfor
PLIST_VARS+= mgcp
# NOSIGPIPE is a temp variable, since PLIST.mgcp MUST remain undefined
# if the grep fails
NOSIGPIPE!= ${GREP} SO_NOSIGPIPE /usr/include/sys/socket.h || echo ""
.if ${NOSIGPIPE} != ""
.for dir in ${COMPILER_INCLUDE_DIRS}
. if (exists(${dir}/sys/socket.h))
NOSIGPIPE!= ${GREP} SO_NOSIGPIPE ${dir}/sys/socket.h || echo ""
. if ${NOSIGPIPE} != ""
PLIST.mgcp= yes
.endif
. endif
. endif
.endfor
.include "options.mk"
@@ -127,19 +133,17 @@ SUBST_SED.configs+= -e "s|/usr/local/man|${ASTMANDIR}|"
SUBST_SED.configs+= -e "s|/usr/local|${PREFIX}|"
SUBST_SED.configs+= -e "s|/var|${VARBASE}|"
.if (${OPSYS} == "NetBSD")
# XXX gross hack, remove when atomics properly implemented
SUBST_CLASSES+= atomics
SUBST_CLASSES.NetBSD+= atomics
SUBST_STAGE.atomics= post-configure
SUBST_FILES.atomics= include/asterisk/autoconfig.h
SUBST_SED.atomics= -e "s|^\#define HAVE_GCC_ATOMICS 1|\#undef HAVE_GCC_ATOMICS|"
# XXX gross hack, IP_PKTINFO in NetBSD isn't compatible with anything else
SUBST_CLASSES+= pktinfo
SUBST_CLASSES.NetBSD+= pktinfo
SUBST_STAGE.pktinfo= post-configure
SUBST_FILES.pktinfo= include/asterisk/autoconfig.h
SUBST_SED.pktinfo= -e "s|^\#define HAVE_PKTINFO 1|\#undef HAVE_PKTINFO|"
.endif
RCD_SCRIPTS= asterisk
OWN_DIRS_PERMS+= ${ASTDBDIR} ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
@@ -195,9 +199,13 @@ CONF_FILES_PERMS+= ${ASTEXAMPLEDIR}/${f:Q} ${PKG_SYSCONFDIR}/${f:Q} ${ASTERISK_
PTHREAD_OPTS+= require native
.if (${OPSYS} == "Darwin" && exists(/usr/include/sys/poll.h))
post-patch:
.if ${OPSYS} == "Darwin"
. for dir in ${COMPILER_INCLUDE_DIRS}
. if exists(${dir}/sys/poll.h)
${ECHO} "#include <sys/poll.h>" > ${WRKSRC}/include/asterisk/poll-compat.h
. endif
. endfor
.endif
post-install:

View File

@@ -1,10 +1,12 @@
$NetBSD: distinfo,v 1.61 2015/04/28 08:48:11 manu Exp $
$NetBSD: distinfo,v 1.62 2015/11/03 01:34:52 agc Exp $
SHA1 (asterisk-1.8.32.3/asterisk-1.8.32.3.tar.gz) = ba0fd90fd744e423950d66c5d3e777419050d62e
RMD160 (asterisk-1.8.32.3/asterisk-1.8.32.3.tar.gz) = 431785ace9f8a516ed6def6cf193fc8cd06b2967
SHA512 (asterisk-1.8.32.3/asterisk-1.8.32.3.tar.gz) = 93ad89018b00888854ac48a38e5d78126cd530c7427dbfc1734bf110869174671c41e2153045b80230f65760e0aa522959d8d5d3b7c65e5a2b3bc10a6dae7412
Size (asterisk-1.8.32.3/asterisk-1.8.32.3.tar.gz) = 29637478 bytes
SHA1 (asterisk-1.8.32.3/asterisk-extra-sounds-en-gsm-1.4.15.tar.gz) = fbb94494e31fc08eee8fdf2ce7d12eb274018050
RMD160 (asterisk-1.8.32.3/asterisk-extra-sounds-en-gsm-1.4.15.tar.gz) = 53656a3d6771602504f220ad312093e3503e1150
SHA512 (asterisk-1.8.32.3/asterisk-extra-sounds-en-gsm-1.4.15.tar.gz) = 3908fcb439fe7d08dc6cba45b7a6aeea9825299871332d30f60535957072521b2f3f60222a49689b6fe1f693f80e3605b91ce395d16e15b15c50025eb086c19b
Size (asterisk-1.8.32.3/asterisk-extra-sounds-en-gsm-1.4.15.tar.gz) = 4409969 bytes
SHA1 (patch-aa) = 832f1c043b15198e0a286094dd0cc1a251bcfed0
SHA1 (patch-af) = 19786616bb606c38f769ec85f2e4d118573659ab

View File

@@ -1,6 +1,7 @@
$NetBSD: distinfo,v 1.5 2005/02/23 16:05:29 agc Exp $
$NetBSD: distinfo,v 1.6 2015/11/03 01:34:53 agc Exp $
SHA1 (binkd098.zip) = 8ebb73c822c1c6fbcfaa8ca0506d1d747448de1e
RMD160 (binkd098.zip) = 490df9c7c615349749b767f5fe959d26ecbaadc3
SHA512 (binkd098.zip) = 901dfde092758a7f930f7b4af18ea8cc6a0f0d8fe37b88fb5b6095986aab981924ac89eefbc80a3582b28c88c7027146908ca295c1b9aec0a2d3d5f0efb03b72
Size (binkd098.zip) = 306884 bytes
SHA1 (patch-aa) = 88356eefd5f2ddad26474f57ce29e533c885b0dd

View File

@@ -1,7 +1,8 @@
$NetBSD: distinfo,v 1.20 2013/10/10 00:02:17 joerg Exp $
$NetBSD: distinfo,v 1.21 2015/11/03 01:34:53 agc Exp $
SHA1 (birda-1.3.tar.gz) = c72a2e05153f82e9e27e5cf36970a49ae122dbfe
RMD160 (birda-1.3.tar.gz) = b53823b22db733a65cea515eadca59aa1024c96a
SHA512 (birda-1.3.tar.gz) = 9598c9b88fa105072f3ee3b5babc5dca32a5407903938415a85727c0100f3d07f9e1c2790af7d6f825d009acf3597cb09bfc382bb168039a0d33698cd3493e41
Size (birda-1.3.tar.gz) = 57848 bytes
SHA1 (patch-aa) = 5dc29878d541f354d5ed4b0cc910ca6d57d498fe
SHA1 (patch-src-iassrv.c) = 538b6af337d278e1d435109b1651a97223979dc6

View File

@@ -1,7 +1,8 @@
$NetBSD: distinfo,v 1.4 2013/09/10 14:13:40 joerg Exp $
$NetBSD: distinfo,v 1.5 2015/11/03 01:34:53 agc Exp $
SHA1 (bthfp-0.1.tar.gz) = f0cefa424596545dec3c7d61eb9e608e8178871b
RMD160 (bthfp-0.1.tar.gz) = 5185c59ee67a7482ec8c424172fdeebed5bb3238
SHA512 (bthfp-0.1.tar.gz) = 8c5fad0101d9df92cc7fe765e27cf9a7073c1b6ef94004b45f89089ff8ad10d57c3dce7385efff33c851e99ea1064fca0f70e0d162fc1ae79a1b7b1a06f7c0a2
Size (bthfp-0.1.tar.gz) = 8522 bytes
SHA1 (patch-aa) = d1f5f88f27f307b8392b260da27cd7e01775d86a
SHA1 (patch-ab) = 83a4185d99f658ca7a1779c5854dc71855277baf

View File

@@ -1,7 +1,8 @@
$NetBSD: distinfo,v 1.7 2010/08/02 07:05:09 wiz Exp $
$NetBSD: distinfo,v 1.8 2015/11/03 01:34:53 agc Exp $
SHA1 (conserver-7.2.7.tar.gz) = e2dfe0d95ceab0e6c2db38161f540ec537d96132
RMD160 (conserver-7.2.7.tar.gz) = 67fe555779293232933b30eea2efd5fcd86b6ea2
SHA512 (conserver-7.2.7.tar.gz) = c9257e9581e8bcced71f4ecd446bb7a2f799ca851a1d5a957e58345d7afd29a687a9c52c665658f1f357af7dd8262487085071af9bbff110611f0c9f4c41fa91
Size (conserver-7.2.7.tar.gz) = 200861 bytes
SHA1 (patch-aa) = 01ab5e3430137e72b786164026785f91295232d4
SHA1 (patch-ab) = 79125fed0be843528dd208664b90323cb23b9e8d

View File

@@ -1,13 +1,14 @@
# $NetBSD: Makefile,v 1.16 2014/11/23 08:57:42 mef Exp $
# $NetBSD: Makefile,v 1.21 2016/06/20 15:25:39 schnoebe Exp $
#
PKGVER= 8.2.0
PKGVER= 8.2.1
PKGREVISION= 2
DISTNAME= conserver-${PKGVER}
PKGNAME= conserver8-${PKGVER}
CATEGORIES= comms
MASTER_SITES= http://www.conserver.com/
MAINTAINER= awrede@users.sourceforge.net
MAINTAINER= pkgsrc-users@netbsd.org
HOMEPAGE= http://www.conserver.com/
COMMENT= Application that allows multiple users to watch serial consoles
#LICENSE= # modified-bsd and more (see LICENSE file)
@@ -21,7 +22,6 @@ GNU_CONFIGURE= YES
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q}
CONFIGURE_ARGS+= --with-master=${CONSERVER_DEFAULTHOST:Q}
CONFIGURE_ARGS+= --with-port=${CONSERVER_DEFAULTPORT:Q}
CONFIGURE_ARGS+= --with-regex
CONFIGURE_ARGS+= --with-libwrap=${BUILDLINK_PREFIX.tcp_wrappers}
CONFIGURE_ARGS+= --with-logfile=${VARBASE:Q}/log/conserver
@@ -46,7 +46,10 @@ SUBST_SED.conf= -e "s,/var/consoles,${VARBASE}/consoles,"
post-install:
set -e; for File in INSTALL README PROTOCOL; do \
${INSTALL_DATA} ${WRKSRC}/$${File} ${DESTDIR}${DOCDIR}/$${File}; \
${INSTALL_DATA} ${WRKSRC}/$${File} ${DESTDIR}${DOCDIR}/$${File};\
done
set -e; for F in ${WRKSRC}/conserver.cf/samples/* ; do \
${INSTALL_DATA} $$F ${DESTDIR}${EGDIR}; \
done
.include "../../security/tcp_wrappers/buildlink3.mk"

View File

@@ -1,4 +1,4 @@
@comment $NetBSD: PLIST,v 1.5 2014/03/11 14:05:00 jperkin Exp $
@comment $NetBSD: PLIST,v 1.6 2016/06/15 23:02:10 schnoebe Exp $
bin/console
lib/conserver/convert
man/man1/console.1
@@ -9,6 +9,11 @@ sbin/conserver
share/doc/conserver/INSTALL
share/doc/conserver/PROTOCOL
share/doc/conserver/README
share/examples/conserver/README
share/examples/conserver/average-distributed.cf
share/examples/conserver/average.cf
share/examples/conserver/basic.cf
share/examples/conserver/conserver.cf
share/examples/conserver/conserver.passwd
share/examples/conserver/conserver.rc
share/examples/conserver/simple.cf

View File

@@ -1,7 +1,9 @@
$NetBSD: distinfo,v 1.8 2014/11/23 08:57:42 mef Exp $
$NetBSD: distinfo,v 1.10 2016/03/13 18:31:11 schnoebe Exp $
SHA1 (conserver-8.2.0.tar.gz) = acbb7f282cea94eb044860c35ddd9f31a0299888
RMD160 (conserver-8.2.0.tar.gz) = fde2c8626f097d2e7f6eb10850a858dfc7d77a19
Size (conserver-8.2.0.tar.gz) = 334326 bytes
SHA1 (conserver-8.2.1.tar.gz) = 357eea46c0189280b0ab66776b01ce3ba02f1847
RMD160 (conserver-8.2.1.tar.gz) = 39f08facffc9b462c8257fa21c24785eb1e2bb5a
SHA512 (conserver-8.2.1.tar.gz) = caf519b8295fc142cf1cb5b141854aede07b3613653f417e9c3ebee75b30a12fa785c248806758f60afbc155cc048418635d514a9848e0fa06992f1e4f930fb6
Size (conserver-8.2.1.tar.gz) = 335241 bytes
SHA1 (patch-aa) = d0eebea0d126c611f6f60035730a0c2f97280b01
SHA1 (patch-ab) = 7a507e428277cc6ccf14b961c44d4e6fd3abcde3
SHA1 (patch-conserver_readcfg.c) = c39e1d50829658cb77e4c943e631da4b3cdd31ee

View File

@@ -1,8 +1,13 @@
# $NetBSD: options.mk,v 1.1 2009/06/14 07:52:51 wiz Exp $
# $NetBSD: options.mk,v 1.4 2016/06/20 15:25:39 schnoebe Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.conserver8
PKG_SUPPORTED_OPTIONS= pam ssl uds
PKG_SUGGESTED_OPTIONS= ssl
PKG_OPTIONS_OPTIONAL_GROUPS= connectivity
PKG_OPTIONS_GROUP.connectivity=inet6 uds
PKG_SUPPORTED_OPTIONS= pam ssl
PKG_SUGGESTED_OPTIONS= ssl inet6
.include "../../mk/bsd.options.mk"
@@ -15,6 +20,10 @@ CONFIGURE_ARGS+= --with-pam
CONFIGURE_ARGS+= --with-uds
.endif
.if !empty(PKG_OPTIONS:Minet6)
CONFIGURE_ARGS+= --with-ipv6
.endif
.if !empty(PKG_OPTIONS:Mssl)
CONFIGURE_ARGS+= --with-openssl=${SSLBASE:Q}
. include "../../security/openssl/buildlink3.mk"

View File

@@ -0,0 +1,22 @@
$NetBSD: patch-conserver_readcfg.c,v 1.1 2016/03/13 18:31:11 schnoebe Exp $
Have readcfg.c use the same logic as main.c uses for setproctitle.
--- conserver/readcfg.c.orig 2015-06-02 17:19:31.000000000 +0000
+++ conserver/readcfg.c
@@ -5376,7 +5376,14 @@ ReReadCfg(int fd, int msfd)
local += pGE->imembers;
for (pRC = pRCList; (REMOTE *)0 != pRC; pRC = pRC->pRCnext)
remote++;
- setproctitle("master: port %hu, %d local, %d remote", bindPort,
+ setproctitle("master: port %hu, %d local, %d remote",
+#if USE_IPV6
+ config->primaryport,
+#elif USE_UNIX_DOMAIN_SOCKETS
+ 0,
+#else
+ bindPort,
+#endif
local, remote);
} else
setproctitle("group %u: port %hu, %d %s", pGroups->id,

View File

@@ -1,9 +1,10 @@
# $NetBSD: Makefile,v 1.22 2015/08/24 23:46:03 khorben Exp $
# $NetBSD: Makefile,v 1.26 2016/08/03 10:22:09 adam Exp $
DISTNAME= Phone-0.4.3
PKGNAME= deforaos-phone-0.4.3
DISTNAME= Phone-0.5.0
PKGNAME= deforaos-phone-0.5.0
PKGREVISION= 2
CATEGORIES= comms net
MASTER_SITES= http://www.defora.org/os/download/download/4366/
MASTER_SITES= http://www.defora.org/os/download/download/4421/
MAINTAINER= khorben@defora.org
HOMEPAGE= http://www.defora.org/
@@ -39,6 +40,7 @@ post-install:
.endif
.include "../../graphics/hicolor-icon-theme/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"
.include "../../x11/deforaos-libdesktop/buildlink3.mk"
.include "../../sysutils/desktop-file-utils/desktopdb.mk"
.include "../../mk/bsd.pkg.mk"

View File

@@ -1,4 +1,4 @@
@comment $NetBSD: PLIST,v 1.5 2015/08/24 23:46:03 khorben Exp $
@comment $NetBSD: PLIST,v 1.6 2016/02/20 02:10:07 khorben Exp $
bin/gprs
bin/phone
bin/phonectl
@@ -10,6 +10,7 @@ include/Desktop/Phone/plugin.h
lib/Phone/modem/debug.so
lib/Phone/modem/hayes.so
lib/Phone/plugins/blacklist.so
lib/Phone/plugins/console.so
lib/Phone/plugins/debug.so
lib/Phone/plugins/engineering.so
lib/Phone/plugins/gprs.so

View File

@@ -1,4 +1,4 @@
# $NetBSD: buildlink3.mk,v 1.1 2015/08/24 23:46:03 khorben Exp $
# $NetBSD: buildlink3.mk,v 1.2 2016/08/03 10:22:09 adam Exp $
BUILDLINK_TREE+= deforaos-phone
@@ -6,7 +6,7 @@ BUILDLINK_TREE+= deforaos-phone
DEFORAOS_PHONE_BUILDLINK3_MK:=
BUILDLINK_API_DEPENDS.deforaos-phone+= deforaos-phone>=0.4.3
BUILDLINK_ABI_DEPENDS.deforaos-phone?= deforaos-phone>=0.4.3
BUILDLINK_ABI_DEPENDS.deforaos-phone?= deforaos-phone>=0.5.0nb2
BUILDLINK_PKGSRCDIR.deforaos-phone?= ../../comms/deforaos-phone
.include "../../x11/deforaos-libdesktop/buildlink3.mk"

Some files were not shown because too many files have changed in this diff Show More