Import of pkgsrc-2016Q3

This commit is contained in:
2016-11-18 22:39:22 +01:00
committed by sambuc
parent 9d819b6d54
commit 1242aa1e36
35952 changed files with 949747 additions and 377081 deletions
+19
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
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"
File diff suppressed because it is too large Load Diff
+60
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
+43
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"
+34
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
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
+145
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
@@ -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);
}
@@ -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,
@@ -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.
@@ -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),
@@ -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;
@@ -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 {
@@ -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"
@@ -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);
@@ -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",
@@ -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;
}
@@ -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");
@@ -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"
+198
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 ()
@@ -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])
@@ -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);
@@ -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;
}
}
@@ -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
@@ -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"
@@ -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),
{
@@ -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. *******************/
/*
@@ -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);
@@ -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
+40
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 */
@@ -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)
@@ -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);
+25
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);
+13
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;
@@ -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;
@@ -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;
@@ -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;
@@ -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
+13
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;
}
@@ -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 */
@@ -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);
@@ -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
@@ -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);
}
@@ -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;
@@ -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 */
@@ -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")) {
@@ -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);
}
}
@@ -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);
}
}
@@ -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)))
@@ -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"
@@ -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)) {
@@ -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
@@ -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;
@@ -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;
@@ -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)
{
@@ -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>