diff options
34 files changed, 792 insertions, 161 deletions
diff --git a/comms/asterisk/Makefile b/comms/asterisk/Makefile index 0976a50c9eb..1525401905a 100644 --- a/comms/asterisk/Makefile +++ b/comms/asterisk/Makefile @@ -1,13 +1,12 @@ -# $NetBSD: Makefile,v 1.122 2015/04/26 11:52:18 ryoon Exp $ +# $NetBSD: Makefile,v 1.123 2015/05/19 07:52:14 jnemeth Exp $ # # NOTE: when updating this package, there are two places that sound # tarballs need to be checked -DISTNAME= asterisk-11.15.1 +DISTNAME= asterisk-11.17.1 DIST_SUBDIR= ${PKGNAME_NOREV} DISTFILES= ${DEFAULT_DISTFILES} EXTRACT_ONLY= ${DISTNAME}.tar.gz -PKGREVISION= 3 CATEGORIES= comms net audio MASTER_SITES= http://downloads.asterisk.org/pub/telephony/asterisk/ \ http://downloads.asterisk.org/pub/telephony/asterisk/old-releases/ \ diff --git a/comms/asterisk/distinfo b/comms/asterisk/distinfo index edfae76babd..e03f01c8ea4 100644 --- a/comms/asterisk/distinfo +++ b/comms/asterisk/distinfo @@ -1,52 +1,66 @@ -$NetBSD: distinfo,v 1.72 2015/01/29 21:54:33 jnemeth Exp $ +$NetBSD: distinfo,v 1.73 2015/05/19 07:52:14 jnemeth Exp $ -SHA1 (asterisk-11.15.1/asterisk-11.15.1.tar.gz) = 8353295dfe1007c184d0ae3868c1a3d914a66a8d -RMD160 (asterisk-11.15.1/asterisk-11.15.1.tar.gz) = 76f5c63baab826a0c2b1bcd72c62c7f053bda930 -Size (asterisk-11.15.1/asterisk-11.15.1.tar.gz) = 34974674 bytes -SHA1 (asterisk-11.15.1/asterisk-extra-sounds-en-gsm-1.4.15.tar.gz) = fbb94494e31fc08eee8fdf2ce7d12eb274018050 -RMD160 (asterisk-11.15.1/asterisk-extra-sounds-en-gsm-1.4.15.tar.gz) = 53656a3d6771602504f220ad312093e3503e1150 -Size (asterisk-11.15.1/asterisk-extra-sounds-en-gsm-1.4.15.tar.gz) = 4409969 bytes +SHA1 (asterisk-11.17.1/asterisk-11.17.1.tar.gz) = 90a83350623cd0d3638e526504107aafe6df4cc5 +RMD160 (asterisk-11.17.1/asterisk-11.17.1.tar.gz) = 1aefeecafb9efb98b9aa259827bf6b72f99a6c5b +Size (asterisk-11.17.1/asterisk-11.17.1.tar.gz) = 35002041 bytes +SHA1 (asterisk-11.17.1/asterisk-extra-sounds-en-gsm-1.4.15.tar.gz) = fbb94494e31fc08eee8fdf2ce7d12eb274018050 +RMD160 (asterisk-11.17.1/asterisk-extra-sounds-en-gsm-1.4.15.tar.gz) = 53656a3d6771602504f220ad312093e3503e1150 +Size (asterisk-11.17.1/asterisk-extra-sounds-en-gsm-1.4.15.tar.gz) = 4409969 bytes SHA1 (patch-Makefile) = ed581d46026e8e89ed8be374c7085efca19911d2 +SHA1 (patch-addons_chan__ooh323.c) = 57f61a2edf0f9f022e03837230ee572ec9cf47b4 SHA1 (patch-apps_app__confbridge.c) = c815905994355a19c32e8e3e2eb5dc9f1679eb29 SHA1 (patch-apps_app__dial.c) = 0f78d2571af88384a2d472ece08bf4b06f9ad211 -SHA1 (patch-apps_app__followme.c) = a54e08d0dd0b6ff12281d4b7b8447707c1cbe20a -SHA1 (patch-apps_app__meetme.c) = 73485931d63b6482aa549ee73ed6a72ec0e5f9a0 -SHA1 (patch-apps_app__queue.c) = d13a54ba203f182b5d61cf0c2a22f00055e1f358 +SHA1 (patch-apps_app__dumpchan.c) = f5a5cc776c99875d1c58e60953fb3f4cec27a94f +SHA1 (patch-apps_app__followme.c) = 0b362486e1759099b61d42a9880109c5743fa0bc +SHA1 (patch-apps_app__meetme.c) = 3927b77fac1cd69f58df4e2ec783359ed0135dad +SHA1 (patch-apps_app__osplookup.c) = 692776511b6a970d29db5fdef9d68af2a3ef6e35 +SHA1 (patch-apps_app__queue.c) = c0f477c45c18c1457386f1cbb6bbff74187fc3ca SHA1 (patch-apps_app__skel.c) = e661a53b61d36343c54be7ad9ea6cde6cb10f180 SHA1 (patch-apps_app__sms.c) = d89b27a9df04d4da98d562241c07d25d182baefc +SHA1 (patch-apps_app__voicemail.c) = 692551a10f51729dd23aa304117eccfb3978c1c8 SHA1 (patch-apps_confbridge_conf__config__parser.c) = 42d5a6e2ce837111d06fa9154c7f66403cb83553 -SHA1 (patch-build__tools_mkpkgconfig) = 2bd3c0e24bc6d721cc234feb19b64a57106fcbe4 +SHA1 (patch-build__tools_mkpkgconfig) = 35f3955e6163fc75945928bb24688507cf6d872c +SHA1 (patch-cdr_cdr__pgsql.c) = b8c9a67b62bd0ce8dc373a7f5708fdf35f3be0aa +SHA1 (patch-cel_cel__pgsql.c) = f295eca04505d011c6548cdb29ddc292d4540714 SHA1 (patch-channels_chan__motif.c) = db6c97ba02a441633338d492032d78cd86f094f5 SHA1 (patch-channels_chan__oss.c) = 0be259a83c4425d08b693a54c43896da039df721 -SHA1 (patch-channels_chan__sip.c) = 61c67e6d7e0a6e27e98614f6d4de15b64c73e7e1 +SHA1 (patch-channels_chan__sip.c) = e711bcb65336ed1803ed92989889258f1d416f6b SHA1 (patch-configure) = 88619fe9072ff69ed8da0a1917ac3852d10998a4 SHA1 (patch-configure.ac) = 2fdae524cfc95f152b86a32405b80f6edae6fa20 SHA1 (patch-contrib_scripts_vmail.cgi) = 650b9bbf3e322d1ad351932cfe6f747baa8f35e4 SHA1 (patch-funcs_func__strings.c) = 4c1db693d845691492b77bbf489764d362de2087 SHA1 (patch-include_asterisk_autoconfig.h.in) = 09a8f8d5398612fdadba25f221b16c19429f81e2 SHA1 (patch-include_asterisk_endian.h) = 41c1a9a9e02fe394bc9261f5559e931b1378ea28 -SHA1 (patch-include_asterisk_inline__api.h) = ff43d14e2608dd08d7d03799dfe9847f9f7f5666 -SHA1 (patch-include_asterisk_lock.h) = 8147210ae994f95a1d730beb85a6488dc9653cc4 +SHA1 (patch-include_asterisk_lock.h) = cb1404e56de4708836091c224df439158119764c SHA1 (patch-include_asterisk_strings.h) = fc5987a98429ca470f7e9bdcf170d49b0c1f3407 -SHA1 (patch-include_asterisk_utils.h) = bb606542498d65268a59aa12e1116ccf3e592135 +SHA1 (patch-include_asterisk_utils.h) = ea06ed86369b1eaedf5d7d245190f54f1eb1edd0 SHA1 (patch-main_Makefile) = 5f9238a528d2b96777e17a4ac6d3e7876dfffb98 SHA1 (patch-main_acl.c) = 1eac532a15127c25981d2db9462a8ccce2c58620 -SHA1 (patch-main_asterisk.c) = df7bcdaeb2fc90f9fdc1b16388fbb5cf7eba141c +SHA1 (patch-main_asterisk.c) = bfdbd5299b7279ef080a015a9a10627aa929dd49 +SHA1 (patch-main_astmm.c) = 27ff06a6eae9396bde2babeff53d004202d0632a +SHA1 (patch-main_cdr.c) = 3d98a342bdbde81109cccd18943b48168768be77 +SHA1 (patch-main_cel.c) = 909ace2328c15cda2934dadac35889351be7c4f7 SHA1 (patch-main_config__options.c) = e49a946da99546684e8988ca4301bcacbb415987 SHA1 (patch-main_features.c) = 1c11207c60ce53c1101141e07ae04d0ddb838450 SHA1 (patch-main_format.c) = a6d446c3de883cf3ef768d03d39e8d8db068b750 -SHA1 (patch-main_http.c) = 1d3d6b47d1ced22faf79fb17c56e7a3067b7c892 -SHA1 (patch-main_manager.c) = 83c8a8b88a0d1b08d2e5f21c8a69ac89461536d4 +SHA1 (patch-main_http.c) = ee464fb67093cc9896cb2a16f117d19b4320a6a0 +SHA1 (patch-main_logger.c) = 3c64602c9453c157157f8a0c63056be30ede99c5 +SHA1 (patch-main_manager.c) = 6700814350f6960ac7543f587ba6c27a443eeef2 SHA1 (patch-main_named__acl.c) = 48c23ed0e558299679bbfc9e564383f9f7dd181f SHA1 (patch-main_netsock.c) = 015796266b9806425180c9bb05a1907116ef086d +SHA1 (patch-main_pbx.c) = a3151ae6c09ed69c588dc67cf39c862e10a15bf2 SHA1 (patch-main_sched.c) = 73759369470b575e73ca78f9cff096ebb477c9b1 -SHA1 (patch-main_stdtime_localtime.c) = 1a5fe07f174fc81d1a59e08a8e5768e99ec46da1 +SHA1 (patch-main_stdtime_localtime.c) = 4b01b34cc2a541487f744b3901c536419c95b394 +SHA1 (patch-main_test.c) = 3f239ed7611facbd937057f056ebc7495403dbaf SHA1 (patch-main_udptl.c) = 260586e4203b4bf51737ba171cbfe57621de8728 -SHA1 (patch-main_utils.c) = e509c0ea81624b7404a535a3e8be563ce58039f6 -SHA1 (patch-pbx_pbx__dundi.c) = 2823c48d64d2b96abb5cf627045d17282629521b +SHA1 (patch-main_utils.c) = df8bfd592f82b9b5c2c95a6860d2dca7003f66ca +SHA1 (patch-pbx_pbx__dundi.c) = 4dbcbbae3cbace91c8ed87e3e10cad0a1eb45e75 SHA1 (patch-res_pjproject_aconfigure) = 0095894c5daac2dec6a9ec745c0ecb8d46c0b73a SHA1 (patch-res_pjproject_aconfigure.ac) = cbabe4a5f1888e180c93404324ddb96728dc20b9 SHA1 (patch-res_pjproject_build.symbian_makedef.sh) = 37781fe307564ad827e9be67f507f84230ebf299 +SHA1 (patch-res_res__calendar.c) = a4c491d8c77f88d0834d0eb52622f7c6e4f3428b +SHA1 (patch-res_res__calendar__caldav.c) = 673e8a256fc748338f35c7deddbf283809d19904 +SHA1 (patch-res_res__calendar__icalendar.c) = 3258522abbdc5c0cfe76868f73f16931118983e5 SHA1 (patch-res_res__config__pgsql.c) = 719fa8939ca0e6cae256dd1b19a11405f475a620 SHA1 (patch-res_res__xmpp.c) = 5296a4f7454e432592a058939c7b0f2e328d53e2 SHA1 (patch-sounds_Makefile) = 792c2e25e1c8334fe8c9038b8b630376a5894c31 @@ -54,7 +68,9 @@ SHA1 (patch-tests_test__abstract__jb.c) = 42cfa303fc2e399aa9fe3bebf51464d0776e17 SHA1 (patch-tests_test__config.c) = fa049dc1fedb8a0c898afa6848406d191acb54d3 SHA1 (patch-tests_test__linkedlists.c) = 73356c76cc48b07737de8a091fa8ad6a49ee9e5c SHA1 (patch-tests_test__locale.c) = e8419bed77d4787356adf8bc81893bea2adb48f4 +SHA1 (patch-tests_test__voicemail__api.c) = 1c6611816aa354e809e22215a43a2d58f61e10b8 SHA1 (patch-utils_Makefile) = e776da1fe1233a1f6933256f530f3bfff026de25 SHA1 (patch-utils_db1-ast_include_db.h) = 94ec413fe6a6154d65c43bdde2b26644d8bb5dac -SHA1 (patch-utils_extconf.c) = 2d6c46c40cec192871396d994473496e1e587866 +SHA1 (patch-utils_extconf.c) = 994fbb3d05b54f57e1d7981ce69b7e3555ddd7d8 +SHA1 (patch-utils_smsq.c) = 938f8373856196e98273cbbd6bc4e6eb39055fbb SHA1 (patch-utils_streamplayer.c) = 965241ce5dd69137884a38b152783b0069551725 diff --git a/comms/asterisk/patches/patch-addons_chan__ooh323.c b/comms/asterisk/patches/patch-addons_chan__ooh323.c new file mode 100644 index 00000000000..83855363dd6 --- /dev/null +++ b/comms/asterisk/patches/patch-addons_chan__ooh323.c @@ -0,0 +1,13 @@ +$NetBSD: patch-addons_chan__ooh323.c,v 1.1 2015/05/19 07:52:14 jnemeth Exp $ + +--- addons/chan_ooh323.c.orig 2014-10-15 09:02:50.000000000 +0000 ++++ addons/chan_ooh323.c +@@ -3950,7 +3950,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); + } + diff --git a/comms/asterisk/patches/patch-apps_app__dumpchan.c b/comms/asterisk/patches/patch-apps_app__dumpchan.c new file mode 100644 index 00000000000..7eeb09cc060 --- /dev/null +++ b/comms/asterisk/patches/patch-apps_app__dumpchan.c @@ -0,0 +1,22 @@ +$NetBSD: patch-apps_app__dumpchan.c,v 1.1 2015/05/19 07:52:14 jnemeth Exp $ + +--- apps/app_dumpchan.c.orig 2015-05-19 02:22:55.000000000 +0000 ++++ apps/app_dumpchan.c +@@ -115,7 +115,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" + "DirectBridge= %s\n" + "IndirectBridge= %s\n" +@@ -154,7 +154,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, diff --git a/comms/asterisk/patches/patch-apps_app__followme.c b/comms/asterisk/patches/patch-apps_app__followme.c index 3717ae775a2..4a5c3e3bb4e 100644 --- a/comms/asterisk/patches/patch-apps_app__followme.c +++ b/comms/asterisk/patches/patch-apps_app__followme.c @@ -1,7 +1,25 @@ -$NetBSD: patch-apps_app__followme.c,v 1.1 2012/12/11 08:22:48 jnemeth Exp $ +$NetBSD: patch-apps_app__followme.c,v 1.2 2015/05/19 07:52:14 jnemeth Exp $ --- apps/app_followme.c.orig 2012-09-06 00:59:23.000000000 +0000 +++ apps/app_followme.c +@@ -372,7 +372,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; + } +@@ -1008,7 +1008,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. @@ -1284,12 +1284,12 @@ static void end_bridge_callback(void *da ast_channel_lock(chan); diff --git a/comms/asterisk/patches/patch-apps_app__meetme.c b/comms/asterisk/patches/patch-apps_app__meetme.c index 8fb6db2bcec..b9e347be38d 100644 --- a/comms/asterisk/patches/patch-apps_app__meetme.c +++ b/comms/asterisk/patches/patch-apps_app__meetme.c @@ -1,8 +1,25 @@ -$NetBSD: patch-apps_app__meetme.c,v 1.1 2013/12/23 01:34:03 jnemeth Exp $ +$NetBSD: patch-apps_app__meetme.c,v 1.2 2015/05/19 07:52:14 jnemeth Exp $ ---- apps/app_meetme.c.orig 2013-09-13 13:48:34.000000000 +0000 +--- apps/app_meetme.c.orig 2014-12-06 17:19:39.000000000 +0000 +++ apps/app_meetme.c -@@ -5001,6 +5001,8 @@ static int user_chan_cb(void *obj, void +@@ -4235,14 +4235,14 @@ bailoutandtrynormal: + "CallerIDName: %s\r\n" + "ConnectedLineNum: %s\r\n" + "ConnectedLineName: %s\r\n" +- "Duration: %ld\r\n", ++ "Duration: %jd\r\n", + ast_channel_name(chan), ast_channel_uniqueid(chan), conf->confno, + user->user_no, + S_COR(ast_channel_caller(user->chan)->id.number.valid, ast_channel_caller(user->chan)->id.number.str, "<unknown>"), + S_COR(ast_channel_caller(user->chan)->id.name.valid, ast_channel_caller(user->chan)->id.name.str, "<unknown>"), + S_COR(ast_channel_connected(user->chan)->id.number.valid, ast_channel_connected(user->chan)->id.number.str, "<unknown>"), + S_COR(ast_channel_connected(user->chan)->id.name.valid, ast_channel_connected(user->chan)->id.name.str, "<unknown>"), +- (long)(now.tv_sec - user->jointime)); ++ (intmax_t)(now.tv_sec - user->jointime)); + } + + if (setusercount) { +@@ -5016,6 +5016,8 @@ static int user_chan_cb(void *obj, void /*! \brief The MeetMeadmin application @@ -11,7 +28,7 @@ $NetBSD: patch-apps_app__meetme.c,v 1.1 2013/12/23 01:34:03 jnemeth Exp $ MeetMeAdmin(confno, command, caller) */ static int admin_exec(struct ast_channel *chan, const char *data) { char *params; -@@ -5082,7 +5084,7 @@ static int admin_exec(struct ast_channel +@@ -5097,7 +5099,7 @@ static int admin_exec(struct ast_channel case 101: /* e: Eject last user*/ { int max_no = 0; @@ -20,7 +37,7 @@ $NetBSD: patch-apps_app__meetme.c,v 1.1 2013/12/23 01:34:03 jnemeth Exp $ ao2_callback(cnf->usercontainer, OBJ_NODATA, user_max_cmp, &max_no); eject_user = ao2_find(cnf->usercontainer, &max_no, 0); -@@ -5840,10 +5842,13 @@ static void answer_trunk_chan(struct ast +@@ -5864,10 +5866,13 @@ static void answer_trunk_chan(struct ast ast_indicate(chan, -1); } @@ -36,7 +53,7 @@ $NetBSD: patch-apps_app__meetme.c,v 1.1 2013/12/23 01:34:03 jnemeth Exp $ struct ast_str *conf_name = ast_str_create(16); struct ast_flags64 conf_flags = { 0 }; struct ast_conference *conf; -@@ -6004,12 +6009,14 @@ static struct sla_ringing_trunk *sla_cho +@@ -6028,12 +6033,14 @@ static struct sla_ringing_trunk *sla_cho return ringing_trunk; } @@ -52,7 +69,7 @@ $NetBSD: patch-apps_app__meetme.c,v 1.1 2013/12/23 01:34:03 jnemeth Exp $ struct sla_ringing_trunk *ringing_trunk = NULL; struct run_station_args args; enum ast_dial_result dial_res; -@@ -6222,7 +6229,7 @@ static struct sla_trunk_ref *sla_find_tr +@@ -6246,7 +6253,7 @@ static struct sla_trunk_ref *sla_find_tr static int sla_check_station_delay(struct sla_station *station, struct sla_ringing_trunk *ringing_trunk) { @@ -61,7 +78,7 @@ $NetBSD: patch-apps_app__meetme.c,v 1.1 2013/12/23 01:34:03 jnemeth Exp $ unsigned int delay = UINT_MAX; int time_left, time_elapsed; -@@ -6633,8 +6640,8 @@ static void *dial_trunk(void *data) +@@ -6657,8 +6664,8 @@ static void *dial_trunk(void *data) char conf_name[MAX_CONFNUM]; struct ast_conference *conf; struct ast_flags64 conf_flags = { 0 }; @@ -72,7 +89,7 @@ $NetBSD: patch-apps_app__meetme.c,v 1.1 2013/12/23 01:34:03 jnemeth Exp $ int caller_is_saved; struct ast_party_caller caller; int last_state = 0; -@@ -6781,8 +6788,8 @@ static struct sla_trunk_ref *sla_choose_ +@@ -6805,8 +6812,8 @@ static struct sla_trunk_ref *sla_choose_ static int sla_station_exec(struct ast_channel *chan, const char *data) { char *station_name, *trunk_name; @@ -83,7 +100,7 @@ $NetBSD: patch-apps_app__meetme.c,v 1.1 2013/12/23 01:34:03 jnemeth Exp $ char conf_name[MAX_CONFNUM]; struct ast_flags64 conf_flags = { 0 }; struct ast_conference *conf; -@@ -7000,12 +7007,14 @@ AST_APP_OPTIONS(sla_trunk_opts, BEGIN_OP +@@ -7024,12 +7031,14 @@ AST_APP_OPTIONS(sla_trunk_opts, BEGIN_OP AST_APP_OPTION_ARG('M', SLA_TRUNK_OPT_MOH, SLA_TRUNK_OPT_ARG_MOH_CLASS), END_OPTIONS ); @@ -99,7 +116,7 @@ $NetBSD: patch-apps_app__meetme.c,v 1.1 2013/12/23 01:34:03 jnemeth Exp $ struct sla_ringing_trunk *ringing_trunk; AST_DECLARE_APP_ARGS(args, AST_APP_ARG(trunk_name); -@@ -7101,7 +7110,7 @@ static int sla_trunk_exec(struct ast_cha +@@ -7125,7 +7134,7 @@ static int sla_trunk_exec(struct ast_cha static enum ast_device_state sla_state(const char *data) { char *buf, *station_name, *trunk_name; @@ -108,7 +125,7 @@ $NetBSD: patch-apps_app__meetme.c,v 1.1 2013/12/23 01:34:03 jnemeth Exp $ struct sla_trunk_ref *trunk_ref; enum ast_device_state res = AST_DEVICE_INVALID; -@@ -7262,7 +7271,7 @@ static void sla_trunk_destructor(void *o +@@ -7286,7 +7295,7 @@ static void sla_trunk_destructor(void *o static int sla_build_trunk(struct ast_config *cfg, const char *cat) { @@ -117,7 +134,7 @@ $NetBSD: patch-apps_app__meetme.c,v 1.1 2013/12/23 01:34:03 jnemeth Exp $ struct ast_variable *var; const char *dev; int existing_trunk = 0; -@@ -7351,7 +7360,7 @@ static int sla_build_trunk(struct ast_co +@@ -7375,7 +7384,7 @@ static int sla_build_trunk(struct ast_co */ static void sla_add_trunk_to_station(struct sla_station *station, struct ast_variable *var) { @@ -126,7 +143,7 @@ $NetBSD: patch-apps_app__meetme.c,v 1.1 2013/12/23 01:34:03 jnemeth Exp $ struct sla_trunk_ref *trunk_ref = NULL; struct sla_station_ref *station_ref; char *trunk_name, *options, *cur; -@@ -7435,7 +7444,7 @@ static void sla_add_trunk_to_station(str +@@ -7459,7 +7468,7 @@ static void sla_add_trunk_to_station(str static int sla_build_station(struct ast_config *cfg, const char *cat) { diff --git a/comms/asterisk/patches/patch-apps_app__osplookup.c b/comms/asterisk/patches/patch-apps_app__osplookup.c new file mode 100644 index 00000000000..2bfac828832 --- /dev/null +++ b/comms/asterisk/patches/patch-apps_app__osplookup.c @@ -0,0 +1,17 @@ +$NetBSD: patch-apps_app__osplookup.c,v 1.1 2015/05/19 07:52:14 jnemeth Exp $ + +--- apps/app_osplookup.c.orig 2015-05-19 02:25:11.000000000 +0000 ++++ apps/app_osplookup.c +@@ -2881,9 +2881,9 @@ static int ospfinished_exec( + connect = 0; + end = 0; + } +- ast_debug(1, "OSPFinish: start '%ld'\n", start); +- ast_debug(1, "OSPFinish: connect '%ld'\n", connect); +- ast_debug(1, "OSPFinish: end '%ld'\n", end); ++ ast_debug(1, "OSPFinish: start '%jd'\n", (intmax_t)start); ++ ast_debug(1, "OSPFinish: connect '%jd'\n", (intmax_t)connect); ++ ast_debug(1, "OSPFinish: end '%jd'\n", (intmax_t)end); + + release = ast_check_hangup(chan) ? 0 : 1; + diff --git a/comms/asterisk/patches/patch-apps_app__queue.c b/comms/asterisk/patches/patch-apps_app__queue.c index 34b4b98f6c9..80e4834edad 100644 --- a/comms/asterisk/patches/patch-apps_app__queue.c +++ b/comms/asterisk/patches/patch-apps_app__queue.c @@ -1,8 +1,8 @@ -$NetBSD: patch-apps_app__queue.c,v 1.4 2014/07/29 04:20:55 jnemeth Exp $ +$NetBSD: patch-apps_app__queue.c,v 1.5 2015/05/19 07:52:14 jnemeth Exp $ ---- apps/app_queue.c.orig 2014-06-12 15:40:41.000000000 +0000 +--- apps/app_queue.c.orig 2015-03-22 23:55:25.000000000 +0000 +++ apps/app_queue.c -@@ -4045,8 +4045,8 @@ static void record_abandoned(struct queu +@@ -4043,8 +4043,8 @@ static void record_abandoned(struct queu "Uniqueid: %s\r\n" "Position: %d\r\n" "OriginalPosition: %d\r\n" @@ -13,16 +13,16 @@ $NetBSD: patch-apps_app__queue.c,v 1.4 2014/07/29 04:20:55 jnemeth Exp $ qe->parent->callsabandoned++; ao2_unlock(qe->parent); -@@ -4818,7 +4818,7 @@ static int wait_our_turn(struct queue_en +@@ -4816,7 +4816,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); +- 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; } -@@ -5058,12 +5058,12 @@ static void send_agent_complete(const st +@@ -5056,12 +5056,12 @@ static void send_agent_complete(const st "Channel: %s\r\n" "Member: %s\r\n" "MemberName: %s\r\n" @@ -38,7 +38,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.4 2014/07/29 04:20:55 jnemeth Exp $ qe->parent->eventwhencalled == QUEUE_EVENT_VARIABLES ? vars2manager(qe->chan, vars, vars_len) : ""); } -@@ -5106,9 +5106,9 @@ static void queue_transfer_fixup(void *d +@@ -5104,9 +5104,9 @@ static void queue_transfer_fixup(void *d int callcompletedinsl = qtds->callcompletedinsl; struct ast_datastore *datastore; @@ -51,38 +51,49 @@ $NetBSD: patch-apps_app__queue.c,v 1.4 2014/07/29 04:20:55 jnemeth Exp $ update_queue(qe->parent, member, callcompletedinsl, (time(NULL) - callstart)); -@@ -5625,7 +5625,7 @@ static int try_calling(struct queue_ent +@@ -5624,7 +5624,7 @@ static int try_calling(struct queue_ent } else if (ast_check_hangup(qe->chan)) { /* Caller must have hung up just before being connected */ ast_log(LOG_NOTICE, "Caller was about to talk to agent on %s but the caller hungup.\n", ast_channel_name(peer)); -- ast_queue_log(queuename, ast_channel_uniqueid(qe->chan), member->membername, "ABANDON", "%d|%d|%ld", qe->pos, qe->opos, (long) time(NULL) - qe->start); -+ ast_queue_log(queuename, ast_channel_uniqueid(qe->chan), member->membername, "ABANDON", "%d|%d|%jd", qe->pos, qe->opos, (intmax_t) time(NULL) - qe->start); +- ast_queue_log(queuename, ast_channel_uniqueid(qe->chan), member->membername, "ABANDON", "%d|%d|%ld", qe->pos, qe->opos, (long) (time(NULL) - qe->start)); ++ ast_queue_log(queuename, ast_channel_uniqueid(qe->chan), member->membername, "ABANDON", "%d|%d|%jd", qe->pos, qe->opos, (intmax_t) (time(NULL) - qe->start)); record_abandoned(qe); ast_autoservice_chan_hangup_peer(qe->chan, peer); ao2_ref(member, -1); -@@ -5674,8 +5674,8 @@ static int try_calling(struct queue_ent +@@ -5664,8 +5664,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); + } +@@ -5673,8 +5673,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); +- (long) (time(NULL) - qe->start), qe->opos); + snprintf(interfacevar, sizeof(interfacevar), "QEHOLDTIME=%jd,QEORIGINALPOS=%d", -+ (intmax_t) time(NULL) - qe->start, qe->opos); ++ (intmax_t) (time(NULL) - qe->start), qe->opos); pbx_builtin_setvar_multiple(qe->chan, interfacevar); pbx_builtin_setvar_multiple(peer, interfacevar); } -@@ -5892,8 +5892,8 @@ static int try_calling(struct queue_ent +@@ -5891,8 +5891,8 @@ static int try_calling(struct queue_ent } } qe->handled++; -- ast_queue_log(queuename, ast_channel_uniqueid(qe->chan), member->membername, "CONNECT", "%ld|%s|%ld", (long) time(NULL) - qe->start, ast_channel_uniqueid(peer), +- ast_queue_log(queuename, ast_channel_uniqueid(qe->chan), member->membername, "CONNECT", "%ld|%s|%ld", (long) (time(NULL) - qe->start), ast_channel_uniqueid(peer), - (long)(orig - to > 0 ? (orig - to) / 1000 : 0)); -+ ast_queue_log(queuename, ast_channel_uniqueid(qe->chan), member->membername, "CONNECT", "%jd|%s|%jd", (intmax_t) time(NULL) - qe->start, ast_channel_uniqueid(peer), ++ ast_queue_log(queuename, ast_channel_uniqueid(qe->chan), member->membername, "CONNECT", "%jd|%s|%jd", (intmax_t) (time(NULL) - qe->start), ast_channel_uniqueid(peer), + (intmax_t)(orig - to > 0 ? (orig - to) / 1000 : 0)); if (ast_channel_cdr(qe->chan)) { struct ast_cdr *cdr; -@@ -5947,12 +5947,12 @@ static int try_calling(struct queue_ent +@@ -5946,12 +5946,12 @@ static int try_calling(struct queue_ent "Channel: %s\r\n" "Member: %s\r\n" "MemberName: %s\r\n" @@ -98,7 +109,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.4 2014/07/29 04:20:55 jnemeth Exp $ qe->parent->eventwhencalled == QUEUE_EVENT_VARIABLES ? vars2manager(qe->chan, vars, sizeof(vars)) : ""); ast_copy_string(oldcontext, ast_channel_context(qe->chan), sizeof(oldcontext)); ast_copy_string(oldexten, ast_channel_exten(qe->chan), sizeof(oldexten)); -@@ -5984,17 +5984,17 @@ static int try_calling(struct queue_ent +@@ -5983,17 +5983,17 @@ static int try_calling(struct queue_ent /* detect a blind transfer */ if (!(ast_channel_softhangup_internal_flag(qe->chan) | ast_channel_softhangup_internal_flag(peer)) && (strcasecmp(oldcontext, ast_channel_context(qe->chan)) || strcasecmp(oldexten, ast_channel_exten(qe->chan)))) { @@ -123,18 +134,29 @@ $NetBSD: patch-apps_app__queue.c,v 1.4 2014/07/29 04:20:55 jnemeth Exp $ send_agent_complete(qe, queuename, peer, member, callstart, vars, sizeof(vars), AGENT); } if ((tds = ast_channel_datastore_find(qe->chan, &queue_transfer_info, NULL))) { -@@ -7174,8 +7174,8 @@ check_turns: +@@ -7126,8 +7126,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; +@@ -7177,8 +7177,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); +- 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); ++ qe.pos, qe.opos, (intmax_t) (time(NULL) - qe.start)); break; } -@@ -7219,7 +7219,7 @@ check_turns: +@@ -7222,7 +7222,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; @@ -143,32 +165,74 @@ $NetBSD: patch-apps_app__queue.c,v 1.4 2014/07/29 04:20:55 jnemeth Exp $ res = 0; break; } -@@ -7241,7 +7241,7 @@ check_turns: +@@ -7244,7 +7244,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); +- 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; } -@@ -7269,8 +7269,8 @@ stop: +@@ -7272,8 +7272,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); +- (long) (time(NULL) - qe.start)); + "%d|%d|%jd", qe.pos, qe.opos, -+ (intmax_t) time(NULL) - qe.start); ++ (intmax_t) (time(NULL) - qe.start)); res = -1; } else if (qcontinue) { reason = QUEUE_CONTINUE; -@@ -7278,7 +7278,7 @@ stop: +@@ -7281,7 +7281,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); +- "%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)); } } +@@ -8404,8 +8404,8 @@ static char *__queues_show(struct manses + mem->paused ? " (paused)" : "", + ast_devstate2str(mem->status)); + if (mem->calls) { +- ast_str_append(&out, 0, " has taken %d calls (last was %ld secs ago)", +- mem->calls, (long) (time(NULL) - mem->lastcall)); ++ ast_str_append(&out, 0, " has taken %d calls (last was %jd secs ago)", ++ mem->calls, (intmax_t) (time(NULL) - mem->lastcall)); + } else { + ast_str_append(&out, 0, " has taken no calls yet"); + } +@@ -8422,9 +8422,9 @@ static char *__queues_show(struct manses + + 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)); + } + } +@@ -8782,7 +8782,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), +@@ -8790,7 +8790,7 @@ static int manager_queues_status(struct + S_COR(ast_channel_caller(qe->chan)->id.name.valid, ast_channel_caller(qe->chan)->id.name.str, "unknown"), + S_COR(ast_channel_connected(qe->chan)->id.number.valid, ast_channel_connected(qe->chan)->id.number.str, "unknown"), + S_COR(ast_channel_connected(qe->chan)->id.name.valid, ast_channel_connected(qe->chan)->id.name.str, "unknown"), +- (long) (now - qe->start), idText); ++ (intmax_t) (now - qe->start), idText); + } + } + ao2_unlock(q); diff --git a/comms/asterisk/patches/patch-apps_app__voicemail.c b/comms/asterisk/patches/patch-apps_app__voicemail.c new file mode 100644 index 00000000000..179068ff9e4 --- /dev/null +++ b/comms/asterisk/patches/patch-apps_app__voicemail.c @@ -0,0 +1,67 @@ +$NetBSD: patch-apps_app__voicemail.c,v 1.1 2015/05/19 07:52:14 jnemeth Exp $ + +--- apps/app_voicemail.c.orig 2015-03-10 18:11:26.000000000 +0000 ++++ apps/app_voicemail.c +@@ -5073,7 +5073,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)) { +@@ -5999,7 +5999,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); + } + + /*! +@@ -6121,7 +6121,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 */ +@@ -6134,7 +6134,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); +@@ -6643,7 +6643,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), +@@ -6687,7 +6687,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, +@@ -6699,7 +6699,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 { diff --git a/comms/asterisk/patches/patch-build__tools_mkpkgconfig b/comms/asterisk/patches/patch-build__tools_mkpkgconfig index 4ae6ecc3517..c2eb8e10cb0 100644 --- a/comms/asterisk/patches/patch-build__tools_mkpkgconfig +++ b/comms/asterisk/patches/patch-build__tools_mkpkgconfig @@ -1,21 +1,19 @@ -$NetBSD: patch-build__tools_mkpkgconfig,v 1.1 2012/12/11 08:22:48 jnemeth Exp $ +$NetBSD: patch-build__tools_mkpkgconfig,v 1.2 2015/05/19 07:52:14 jnemeth Exp $ ---- build_tools/mkpkgconfig.orig 2011-08-25 15:29:56.000000000 +0000 +--- build_tools/mkpkgconfig.orig 2015-01-14 15:34:16.000000000 +0000 +++ build_tools/mkpkgconfig -@@ -21,12 +21,15 @@ else +@@ -21,11 +21,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/\s*-pipe\s*//g' | ${EXTREGEX} 's/-[Wmp]\S*\s*//g' | \ - ${EXTREGEX} 's/-I(include|\.\.\/include) //g' | \ + 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/-DAST(ETCDIR|LIBDIR|VARLIBDIR|VARRUNDIR|SPOOLDIR|LOGDIR|CONFPATH|MODDIR|AGIDIR)=\S* //g' | \ -+ ${EXTREGEX} "s;${WRKSRC};${PREFIX};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" diff --git a/comms/asterisk/patches/patch-cdr_cdr__pgsql.c b/comms/asterisk/patches/patch-cdr_cdr__pgsql.c new file mode 100644 index 00000000000..27f7eb43227 --- /dev/null +++ b/comms/asterisk/patches/patch-cdr_cdr__pgsql.c @@ -0,0 +1,31 @@ +$NetBSD: patch-cdr_cdr__pgsql.c,v 1.1 2015/05/19 07:52:14 jnemeth Exp $ + +--- cdr/cdr_pgsql.c.orig 2012-07-31 20:21:43.000000000 +0000 ++++ cdr/cdr_pgsql.c +@@ -235,7 +235,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); +@@ -249,7 +249,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); +@@ -263,7 +263,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); diff --git a/comms/asterisk/patches/patch-cel_cel__pgsql.c b/comms/asterisk/patches/patch-cel_cel__pgsql.c new file mode 100644 index 00000000000..fd7922547c0 --- /dev/null +++ b/comms/asterisk/patches/patch-cel_cel__pgsql.c @@ -0,0 +1,13 @@ +$NetBSD: patch-cel_cel__pgsql.c,v 1.1 2015/05/19 07:52:14 jnemeth Exp $ + +--- cel/cel_pgsql.c.orig 2014-05-09 22:28:40.000000000 +0000 ++++ cel/cel_pgsql.c +@@ -167,7 +167,7 @@ static void pgsql_log(const struct ast_e + 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", diff --git a/comms/asterisk/patches/patch-channels_chan__sip.c b/comms/asterisk/patches/patch-channels_chan__sip.c index e7f85341ff7..c4ea050bd9d 100644 --- a/comms/asterisk/patches/patch-channels_chan__sip.c +++ b/comms/asterisk/patches/patch-channels_chan__sip.c @@ -1,8 +1,8 @@ -$NetBSD: patch-channels_chan__sip.c,v 1.1 2014/07/29 04:20:55 jnemeth Exp $ +$NetBSD: patch-channels_chan__sip.c,v 1.2 2015/05/19 07:52:14 jnemeth Exp $ ---- channels/chan_sip.c.orig 2014-06-30 19:42:18.000000000 +0000 +--- channels/chan_sip.c.orig 2015-03-19 09:39:28.000000000 +0000 +++ channels/chan_sip.c -@@ -17537,6 +17537,8 @@ static int get_rdnis(struct sip_pvt *p, +@@ -17515,6 +17515,8 @@ static int get_rdnis(struct sip_pvt *p, return 0; } @@ -11,7 +11,7 @@ $NetBSD: patch-channels_chan__sip.c,v 1.1 2014/07/29 04:20:55 jnemeth Exp $ /*! * \brief Find out who the call is for. * -@@ -17554,7 +17556,7 @@ static int get_rdnis(struct sip_pvt *p, +@@ -17532,7 +17534,7 @@ static int get_rdnis(struct sip_pvt *p, static enum sip_get_dest_result get_destination(struct sip_pvt *p, struct sip_request *oreq, int *cc_recall_core_id) { char tmp[256] = "", *uri, *unused_password, *domain; @@ -20,7 +20,7 @@ $NetBSD: patch-channels_chan__sip.c,v 1.1 2014/07/29 04:20:55 jnemeth Exp $ char *from = NULL; struct sip_request *req; char *decoded_uri; -@@ -18426,6 +18428,8 @@ static enum check_auth_result check_peer +@@ -18405,6 +18407,8 @@ static enum check_auth_result check_peer return res; } @@ -29,7 +29,7 @@ $NetBSD: patch-channels_chan__sip.c,v 1.1 2014/07/29 04:20:55 jnemeth Exp $ /*! \brief Check if matching user or peer is defined Match user on From: user name and peer on IP/port -@@ -18437,8 +18441,8 @@ static enum check_auth_result check_user +@@ -18416,8 +18420,8 @@ static enum check_auth_result check_user struct ast_sockaddr *addr, struct sip_peer **authpeer) { char *of, *name, *unused_password, *domain; @@ -40,3 +40,32 @@ $NetBSD: patch-channels_chan__sip.c,v 1.1 2014/07/29 04:20:55 jnemeth Exp $ enum check_auth_result res = AUTH_DONT_KNOW; char calleridname[256]; char *uri2 = ast_strdupa(uri); +@@ -19054,7 +19058,7 @@ static int manager_show_registry(struct + "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, +@@ -19064,7 +19068,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); + ASTOBJ_UNLOCK(iterator); + total++; + } while(0)); +@@ -29112,8 +29116,8 @@ static int check_rtp_timeout(struct sip_ + */ + return 0; + } +- ast_log(LOG_NOTICE, "Disconnecting call '%s' for lack of RTP activity in %ld seconds\n", +- ast_channel_name(dialog->owner), (long) (t - dialog->lastrtprx)); ++ ast_log(LOG_NOTICE, "Disconnecting call '%s' for lack of RTP activity in %jd seconds\n", ++ ast_channel_name(dialog->owner), (intmax_t) (t - dialog->lastrtprx)); + manager_event(EVENT_FLAG_CALL, "SessionTimeout", "Source: RTPTimeout\r\n" + "Channel: %s\r\nUniqueid: %s\r\n", ast_channel_name(dialog->owner), ast_channel_uniqueid(dialog->owner)); + /* Issue a softhangup */ diff --git a/comms/asterisk/patches/patch-include_asterisk_inline__api.h b/comms/asterisk/patches/patch-include_asterisk_inline__api.h deleted file mode 100644 index fbb941453ba..00000000000 --- a/comms/asterisk/patches/patch-include_asterisk_inline__api.h +++ /dev/null @@ -1,17 +0,0 @@ -$NetBSD: patch-include_asterisk_inline__api.h,v 1.1 2012/05/04 16:06:13 joerg Exp $ - ---- include/asterisk/inline_api.h.orig 2006-02-14 19:14:15.000000000 +0000 -+++ include/asterisk/inline_api.h -@@ -46,7 +46,11 @@ - #if !defined(LOW_MEMORY) - - #if !defined(AST_API_MODULE) --#define AST_INLINE_API(hdr, body) hdr; extern inline hdr body -+# ifndef __GNUC_STDC_INLINE__ -+# define AST_INLINE_API(hdr, body) hdr; extern inline hdr body -+# else -+# define AST_INLINE_API(hdr, body) inline hdr body -+# endif - #else - #define AST_INLINE_API(hdr, body) hdr; hdr body - #endif diff --git a/comms/asterisk/patches/patch-include_asterisk_lock.h b/comms/asterisk/patches/patch-include_asterisk_lock.h index 927a050e34f..ab9ab28a635 100644 --- a/comms/asterisk/patches/patch-include_asterisk_lock.h +++ b/comms/asterisk/patches/patch-include_asterisk_lock.h @@ -1,8 +1,8 @@ -$NetBSD: patch-include_asterisk_lock.h,v 1.2 2013/06/14 04:26:55 jnemeth Exp $ +$NetBSD: patch-include_asterisk_lock.h,v 1.3 2015/05/19 07:52:14 jnemeth Exp $ ---- include/asterisk/lock.h.orig 2012-11-22 23:58:08.000000000 +0000 +--- include/asterisk/lock.h.orig 2015-02-21 02:45:17.000000000 +0000 +++ include/asterisk/lock.h -@@ -561,6 +561,17 @@ static void __attribute__((destructor)) +@@ -516,6 +516,17 @@ static void __attribute__((destructor)) #define AST_RWLOCK_DEFINE_STATIC(rwlock) __AST_RWLOCK_DEFINE(static, rwlock, AST_RWLOCK_INIT_VALUE, 1) #define AST_RWLOCK_DEFINE_STATIC_NOTRACKING(rwlock) __AST_RWLOCK_DEFINE(static, rwlock, AST_RWLOCK_INIT_VALUE_NOTRACKING, 0) @@ -20,7 +20,7 @@ $NetBSD: patch-include_asterisk_lock.h,v 1.2 2013/06/14 04:26:55 jnemeth Exp $ #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 -@@ -581,7 +592,7 @@ static void __attribute__((destructor)) +@@ -536,7 +547,7 @@ static void __attribute__((destructor)) #define gethostbyname __gethostbyname__is__not__reentrant__use__ast_gethostbyname__instead__ @@ -29,7 +29,7 @@ $NetBSD: patch-include_asterisk_lock.h,v 1.2 2013/06/14 04:26:55 jnemeth Exp $ #define pthread_create __use_ast_pthread_create_instead__ #endif -@@ -603,6 +614,10 @@ int ast_atomic_fetchadd_int_slow(volatil +@@ -558,6 +569,10 @@ int ast_atomic_fetchadd_int_slow(volatil #include "libkern/OSAtomic.h" #endif @@ -40,28 +40,36 @@ $NetBSD: patch-include_asterisk_lock.h,v 1.2 2013/06/14 04:26:55 jnemeth Exp $ /*! \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. -@@ -622,6 +637,12 @@ AST_INLINE_API(int ast_atomic_fetchadd_i - AST_INLINE_API(int ast_atomic_fetchadd_int(volatile int *p, int v), +@@ -578,6 +593,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) ++#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_int_nv((unsigned int *)p, v) - 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), -@@ -668,6 +689,12 @@ AST_INLINE_API(int ast_atomic_dec_and_te - AST_INLINE_API(int ast_atomic_dec_and_test(volatile int *p), +@@ -625,6 +650,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) ++#elif defined(HAVE_SYS_ATOMIC_H) && (SIZEOF_INT == 8) +AST_INLINE_API(int ast_atomic_dec_and_test(volatile int *p), +{ -+ return atomic_dec_uint_nv((unsigned int *)p) == 0; ++ return atomic_dec_64_nv((uint64_t *)p) == 0; +}) #else AST_INLINE_API(int ast_atomic_dec_and_test(volatile int *p), diff --git a/comms/asterisk/patches/patch-include_asterisk_utils.h b/comms/asterisk/patches/patch-include_asterisk_utils.h index f04380ca7b4..6d9e59481a3 100644 --- a/comms/asterisk/patches/patch-include_asterisk_utils.h +++ b/comms/asterisk/patches/patch-include_asterisk_utils.h @@ -1,18 +1,40 @@ -$NetBSD: patch-include_asterisk_utils.h,v 1.1 2013/08/08 00:45:10 jnemeth Exp $ +$NetBSD: patch-include_asterisk_utils.h,v 1.2 2015/05/19 07:52:14 jnemeth Exp $ ---- include/asterisk/utils.h.orig 2013-04-30 13:46:53.000000000 +0000 +--- include/asterisk/utils.h.orig 2015-03-12 12:26:57.000000000 +0000 +++ include/asterisk/utils.h -@@ -926,10 +926,9 @@ char *ast_utils_which(const char *binary - * } +@@ -943,30 +943,9 @@ char *ast_utils_which(const char *binary * \encode */ --#define RAII_VAR(vartype, varname, initval, dtor) \ -- /* Prototype needed due to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36774 */ \ -- auto void _dtor_ ## varname (vartype * v); \ -- void _dtor_ ## varname (vartype * v) { dtor(*v); } \ + +-#if defined(__clang__) +- +-#if defined(__has_feature) && __has_feature(blocks) +-typedef void (^_raii_cleanup_block_t)(void); +-static inline void _raii_cleanup_block(_raii_cleanup_block_t *b) { (*b)(); } +- +-#define RAII_VAR(vartype, varname, initval, dtor) \ +- _raii_cleanup_block_t _raii_cleanup_ ## varname __attribute__((cleanup(_raii_cleanup_block),unused)) = NULL; \ +- vartype varname = initval; \ +- _raii_cleanup_ ## varname = ^{ dtor(varname); } +- +-#else +- #error "CLANG must support the 'blocks' feature to compile Asterisk." +-#endif /* #if defined(__has_feature) && __has_feature(blocks) */ +- +-#elif defined(__GNUC__) +- +-#define RAII_VAR(vartype, varname, initval, dtor) \ +- auto void _dtor_ ## varname (vartype * v); \ +- void _dtor_ ## varname (vartype * v) { dtor(*v); } \ +- vartype varname __attribute__((cleanup(_dtor_ ## varname))) = (initval) +- +-#else +- #error "Cannot compile Asterisk: unknown and unsupported compiler." +-#endif /* #if __GNUC__ */ +- +#define RAII_DECL(vartype, varname, dtor) \ -+ static void _dtor_ ## varname (vartype * v) { dtor(*v); } ++ static void _dtor_ ## varname (vartype * v) { dtor(*v); } +#define RAII_VAR(vartype, varname, initval) \ - vartype varname __attribute__((cleanup(_dtor_ ## varname))) = (initval) - ++ vartype varname __attribute__((cleanup(_dtor_ ## varname))) = (initval) ++ #endif /* _ASTERISK_UTILS_H */ diff --git a/comms/asterisk/patches/patch-main_asterisk.c b/comms/asterisk/patches/patch-main_asterisk.c index 80d6914321e..99824467e02 100644 --- a/comms/asterisk/patches/patch-main_asterisk.c +++ b/comms/asterisk/patches/patch-main_asterisk.c @@ -1,13 +1,13 @@ -$NetBSD: patch-main_asterisk.c,v 1.1 2012/12/11 08:22:49 jnemeth Exp $ +$NetBSD: patch-main_asterisk.c,v 1.2 2015/05/19 07:52:14 jnemeth Exp $ ---- main/asterisk.c.orig 2012-09-11 21:04:36.000000000 +0000 +--- main/asterisk.c.orig 2015-03-22 20:32:17.000000000 +0000 +++ main/asterisk.c -@@ -89,7 +89,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revisi +@@ -88,7 +88,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revisi + #include <sys/param.h> #include <sys/sysctl.h> - #if !defined(__OpenBSD__) #include <sys/vmmeter.h> -#if defined(__FreeBSD__) +#if defined(__FreeBSD__) || defined(__DragonFly__) #include <vm/vm_param.h> #endif - #endif + #if defined(HAVE_SWAPCTL) diff --git a/comms/asterisk/patches/patch-main_astmm.c b/comms/asterisk/patches/patch-main_astmm.c new file mode 100644 index 00000000000..83c649f34e9 --- /dev/null +++ b/comms/asterisk/patches/patch-main_astmm.c @@ -0,0 +1,13 @@ +$NetBSD: patch-main_astmm.c,v 1.1 2015/05/19 07:52:14 jnemeth Exp $ + +--- main/astmm.c.orig 2013-09-09 23:21:46.000000000 +0000 ++++ main/astmm.c +@@ -1423,7 +1423,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); diff --git a/comms/asterisk/patches/patch-main_cdr.c b/comms/asterisk/patches/patch-main_cdr.c new file mode 100644 index 00000000000..1802cc8f7c5 --- /dev/null +++ b/comms/asterisk/patches/patch-main_cdr.c @@ -0,0 +1,29 @@ +$NetBSD: patch-main_cdr.c,v 1.1 2015/05/19 07:52:14 jnemeth Exp $ + +--- main/cdr.c.orig 2013-08-06 08:19:42.000000000 +0000 ++++ main/cdr.c +@@ -260,7 +260,7 @@ static const char *ast_cdr_getvar_intern + static void cdr_get_tv(struct timeval when, const char *fmt, char *buf, int bufsize) + { + 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 { + if (when.tv_sec) { + struct ast_tm tm; +@@ -307,12 +307,12 @@ void ast_cdr_getvar(struct ast_cdr *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); ++ snprintf(workspace, workspacelen, "%jd", cdr->disposition); + } else { + ast_copy_string(workspace, ast_cdr_disp2str(cdr->disposition), workspacelen); + } diff --git a/comms/asterisk/patches/patch-main_cel.c b/comms/asterisk/patches/patch-main_cel.c new file mode 100644 index 00000000000..7ebfd7eefec --- /dev/null +++ b/comms/asterisk/patches/patch-main_cel.c @@ -0,0 +1,13 @@ +$NetBSD: patch-main_cel.c,v 1.1 2015/05/19 07:52:14 jnemeth Exp $ + +--- main/cel.c.orig 2014-05-09 22:28:40.000000000 +0000 ++++ main/cel.c +@@ -515,7 +515,7 @@ struct ast_channel *ast_cel_fabricate_ch + } + + if (ast_strlen_zero(cel_dateformat)) { +- 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; diff --git a/comms/asterisk/patches/patch-main_http.c b/comms/asterisk/patches/patch-main_http.c index 191b6602e22..734972f21a2 100644 --- a/comms/asterisk/patches/patch-main_http.c +++ b/comms/asterisk/patches/patch-main_http.c @@ -1,8 +1,17 @@ -$NetBSD: patch-main_http.c,v 1.1 2013/12/23 01:34:03 jnemeth Exp $ +$NetBSD: patch-main_http.c,v 1.2 2015/05/19 07:52:14 jnemeth Exp $ ---- main/http.c.orig 2013-08-21 17:07:06.000000000 +0000 +--- main/http.c.orig 2015-02-21 14:04:54.000000000 +0000 +++ main/http.c -@@ -1014,6 +1014,8 @@ static void add_redirect(const char *val +@@ -272,7 +272,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; +@@ -1062,6 +1062,8 @@ static void add_redirect(const char *val AST_RWLIST_UNLOCK(&uri_redirects); } @@ -11,7 +20,7 @@ $NetBSD: patch-main_http.c,v 1.1 2013/12/23 01:34:03 jnemeth Exp $ static int __ast_http_load(int reload) { struct ast_config *cfg; -@@ -1024,7 +1026,7 @@ static int __ast_http_load(int reload) +@@ -1072,7 +1074,7 @@ static int __ast_http_load(int reload) struct http_uri_redirect *redirect; struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 }; uint32_t bindport = DEFAULT_PORT; diff --git a/comms/asterisk/patches/patch-main_logger.c b/comms/asterisk/patches/patch-main_logger.c new file mode 100644 index 00000000000..6a2a22acd5a --- /dev/null +++ b/comms/asterisk/patches/patch-main_logger.c @@ -0,0 +1,22 @@ +$NetBSD: patch-main_logger.c,v 1.1 2015/05/19 07:52:14 jnemeth Exp $ + +--- main/logger.c.orig 2015-03-19 10:19:11.000000000 +0000 ++++ main/logger.c +@@ -607,7 +607,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); +@@ -644,7 +644,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; diff --git a/comms/asterisk/patches/patch-main_manager.c b/comms/asterisk/patches/patch-main_manager.c index a0022c24f4c..de4d2cce842 100644 --- a/comms/asterisk/patches/patch-main_manager.c +++ b/comms/asterisk/patches/patch-main_manager.c @@ -1,6 +1,6 @@ -$NetBSD: patch-main_manager.c,v 1.4 2014/12/16 01:00:22 jnemeth Exp $ +$NetBSD: patch-main_manager.c,v 1.5 2015/05/19 07:52:14 jnemeth Exp $ ---- main/manager.c.orig 2014-11-21 18:47:12.000000000 +0000 +--- main/manager.c.orig 2014-12-17 09:24:50.000000000 +0000 +++ main/manager.c @@ -1886,7 +1886,7 @@ static char *handle_showmanconn(struct a struct mansession_session *session; @@ -22,6 +22,45 @@ $NetBSD: patch-main_manager.c,v 1.4 2014/12/16 01:00:22 jnemeth Exp $ session->fd, session->inuse, session->readperm, +@@ -2726,9 +2726,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; + } + +@@ -3580,7 +3580,7 @@ static int action_status(struct mansessi + struct ast_channel *c; + char bridge[256]; + struct timeval now = ast_tvnow(); +- long elapsed_seconds = 0; ++ intmax_t elapsed_seconds = 0; + int channels = 0; + int all = ast_strlen_zero(name); /* set if we want all channels */ + const char *id = astman_get_header(m, "ActionID"); +@@ -3670,7 +3670,7 @@ static int action_status(struct mansessi + "Context: %s\r\n" + "Extension: %s\r\n" + "Priority: %d\r\n" +- "Seconds: %ld\r\n" ++ "Seconds: %jd\r\n" + "%s" + "Uniqueid: %s\r\n" + "%s" +@@ -3684,7 +3684,7 @@ static int action_status(struct mansessi + ast_channel_accountcode(c), + ast_channel_state(c), + ast_state2str(ast_channel_state(c)), ast_channel_context(c), +- ast_channel_exten(c), ast_channel_priority(c), (long)elapsed_seconds, bridge, ast_channel_uniqueid(c), ast_str_buffer(str), idText); ++ ast_channel_exten(c), ast_channel_priority(c), (intmax_t)elapsed_seconds, bridge, ast_channel_uniqueid(c), ast_str_buffer(str), idText); + } else { + astman_append(s, + "Event: Status\r\n" @@ -5735,11 +5735,13 @@ static void append_channel_vars(struct a AST_THREADSTORAGE(manager_event_buf); #define MANAGER_EVENT_BUF_INITSIZE 256 @@ -37,6 +76,17 @@ $NetBSD: patch-main_manager.c,v 1.4 2014/12/16 01:00:22 jnemeth Exp $ struct mansession_session *session; struct manager_custom_hook *hook; struct ast_str *auth = ast_str_alloca(MAX_AUTH_PERM_STRING); +@@ -5765,8 +5767,8 @@ int __ast_manager_event_multichan(int ca + 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; @@ -7361,9 +7363,11 @@ static char *handle_manager_show_events( return CLI_SUCCESS; } diff --git a/comms/asterisk/patches/patch-main_pbx.c b/comms/asterisk/patches/patch-main_pbx.c new file mode 100644 index 00000000000..c74c661aebb --- /dev/null +++ b/comms/asterisk/patches/patch-main_pbx.c @@ -0,0 +1,22 @@ +$NetBSD: patch-main_pbx.c,v 1.1 2015/05/19 07:52:14 jnemeth Exp $ + +--- main/pbx.c.orig 2015-01-30 16:55:39.000000000 +0000 ++++ main/pbx.c +@@ -11201,7 +11201,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; + } +@@ -11235,7 +11235,7 @@ 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", ×ecs) == 1) { ++ if ((ctime = pbx_builtin_getvar_helper(chan, "TESTTIME")) && sscanf(ctime, "%jd", ×ecs) == 1) { + tv.tv_sec = timesecs; + } else if (ctime) { + ast_log(LOG_WARNING, "Using current time to evaluate\n"); diff --git a/comms/asterisk/patches/patch-main_stdtime_localtime.c b/comms/asterisk/patches/patch-main_stdtime_localtime.c index cf8e36c5bd2..cd51555d3ba 100644 --- a/comms/asterisk/patches/patch-main_stdtime_localtime.c +++ b/comms/asterisk/patches/patch-main_stdtime_localtime.c @@ -1,8 +1,17 @@ -$NetBSD: patch-main_stdtime_localtime.c,v 1.1 2013/06/14 04:26:55 jnemeth Exp $ +$NetBSD: patch-main_stdtime_localtime.c,v 1.2 2015/05/19 07:52:14 jnemeth Exp $ ---- main/stdtime/localtime.c.orig 2012-12-03 20:43:03.000000000 +0000 +--- main/stdtime/localtime.c.orig 2015-03-10 17:42:57.000000000 +0000 +++ main/stdtime/localtime.c -@@ -2232,6 +2232,23 @@ static struct locale_entry *find_by_name +@@ -733,7 +733,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 +2417,23 @@ static struct locale_entry *find_by_name return NULL; } @@ -26,7 +35,7 @@ $NetBSD: patch-main_stdtime_localtime.c,v 1.1 2013/06/14 04:26:55 jnemeth Exp $ static const char *store_by_locale(locale_t prevlocale) { struct locale_entry *cur; -@@ -2289,6 +2306,7 @@ const char *ast_setlocale(const char *lo +@@ -2474,6 +2491,7 @@ const char *ast_setlocale(const char *lo AST_LIST_UNLOCK(&localelist); return store_by_locale(prevlocale); } @@ -34,7 +43,7 @@ $NetBSD: patch-main_stdtime_localtime.c,v 1.1 2013/06/14 04:26:55 jnemeth Exp $ #else const char *ast_setlocale(const char *unused) { -@@ -2302,7 +2320,9 @@ int ast_strftime_locale(char *buf, size_ +@@ -2487,7 +2505,9 @@ int ast_strftime_locale(char *buf, size_ char *format = ast_calloc(1, fmtlen), *fptr = format, *newfmt; int decimals = -1, i, res; long fraction; @@ -42,9 +51,9 @@ $NetBSD: patch-main_stdtime_localtime.c,v 1.1 2013/06/14 04:26:55 jnemeth Exp $ const char *prevlocale; +#endif + buf[0] = '\0';/* Ensure the buffer is initialized. */ if (!format) { - return -1; -@@ -2356,6 +2376,14 @@ defcase: *fptr++ = *tmp; +@@ -2542,6 +2562,14 @@ defcase: *fptr++ = *tmp; } *fptr = '\0'; #undef strftime @@ -59,7 +68,7 @@ $NetBSD: patch-main_stdtime_localtime.c,v 1.1 2013/06/14 04:26:55 jnemeth Exp $ if (locale) { prevlocale = ast_setlocale(locale); } -@@ -2363,6 +2391,7 @@ defcase: *fptr++ = *tmp; +@@ -2549,6 +2577,7 @@ defcase: *fptr++ = *tmp; if (locale) { ast_setlocale(prevlocale); } @@ -67,7 +76,7 @@ $NetBSD: patch-main_stdtime_localtime.c,v 1.1 2013/06/14 04:26:55 jnemeth Exp $ ast_free(format); return res; } -@@ -2376,11 +2405,22 @@ char *ast_strptime_locale(const char *s, +@@ -2562,11 +2591,22 @@ char *ast_strptime_locale(const char *s, { struct tm tm2 = { 0, }; char *res; diff --git a/comms/asterisk/patches/patch-main_test.c b/comms/asterisk/patches/patch-main_test.c new file mode 100644 index 00000000000..b71be770987 --- /dev/null +++ b/comms/asterisk/patches/patch-main_test.c @@ -0,0 +1,13 @@ +$NetBSD: patch-main_test.c,v 1.1 2015/05/19 07:52:14 jnemeth Exp $ + +--- main/test.c.orig 2014-06-19 19:34:37.000000000 +0000 ++++ main/test.c +@@ -858,7 +858,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); + } diff --git a/comms/asterisk/patches/patch-main_utils.c b/comms/asterisk/patches/patch-main_utils.c index 9144b9e5289..0948001bc2e 100644 --- a/comms/asterisk/patches/patch-main_utils.c +++ b/comms/asterisk/patches/patch-main_utils.c @@ -1,9 +1,9 @@ -$NetBSD: patch-main_utils.c,v 1.1 2012/12/11 08:22:49 jnemeth Exp $ +$NetBSD: patch-main_utils.c,v 1.2 2015/05/19 07:52:14 jnemeth Exp $ ---- main/utils.c.orig 2012-08-27 14:07:12.000000000 +0000 +--- main/utils.c.orig 2015-03-17 22:28:41.000000000 +0000 +++ main/utils.c -@@ -500,7 +500,7 @@ const char *ast_inet_ntoa(struct in_addr - static int dev_urandom_fd; +@@ -625,7 +625,7 @@ const char *ast_inet_ntoa(struct in_addr + static int dev_urandom_fd = -1; #endif -#ifndef __linux__ @@ -11,7 +11,7 @@ $NetBSD: patch-main_utils.c,v 1.1 2012/12/11 08:22:49 jnemeth Exp $ #undef pthread_create /* For ast_pthread_create function only */ #endif /* !__linux__ */ -@@ -1431,13 +1431,13 @@ int ast_false(const char *s) +@@ -1642,13 +1642,13 @@ int ast_false(const char *s) static struct timeval tvfix(struct timeval a) { if (a.tv_usec >= ONE_MILLION) { diff --git a/comms/asterisk/patches/patch-pbx_pbx__dundi.c b/comms/asterisk/patches/patch-pbx_pbx__dundi.c index 5d4b6831f46..63c2fe94102 100644 --- a/comms/asterisk/patches/patch-pbx_pbx__dundi.c +++ b/comms/asterisk/patches/patch-pbx_pbx__dundi.c @@ -1,6 +1,6 @@ -$NetBSD: patch-pbx_pbx__dundi.c,v 1.1 2012/12/11 08:22:49 jnemeth Exp $ +$NetBSD: patch-pbx_pbx__dundi.c,v 1.2 2015/05/19 07:52:14 jnemeth Exp $ ---- pbx/pbx_dundi.c.orig 2012-09-06 02:50:34.000000000 +0000 +--- pbx/pbx_dundi.c.orig 2014-05-09 22:28:40.000000000 +0000 +++ pbx/pbx_dundi.c @@ -38,7 +38,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revisi #include <pthread.h> @@ -11,3 +11,30 @@ $NetBSD: patch-pbx_pbx__dundi.c,v 1.1 2012/12/11 08:22:49 jnemeth Exp $ #include <net/if_dl.h> #include <ifaddrs.h> #include <signal.h> +@@ -876,7 +876,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); +@@ -912,7 +912,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, '|')) +@@ -2157,7 +2157,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 */ diff --git a/comms/asterisk/patches/patch-res_res__calendar.c b/comms/asterisk/patches/patch-res_res__calendar.c new file mode 100644 index 00000000000..57a60f0af87 --- /dev/null +++ b/comms/asterisk/patches/patch-res_res__calendar.c @@ -0,0 +1,37 @@ +$NetBSD: patch-res_res__calendar.c,v 1.1 2015/05/19 07:52:14 jnemeth Exp $ + +--- res/res_calendar.c.orig 2014-11-19 16:38:10.000000000 +0000 ++++ res/res_calendar.c +@@ -1219,7 +1219,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); +@@ -1352,9 +1352,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")) { +@@ -1713,9 +1713,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")) { diff --git a/comms/asterisk/patches/patch-res_res__calendar__caldav.c b/comms/asterisk/patches/patch-res_res__calendar__caldav.c new file mode 100644 index 00000000000..eb070076c16 --- /dev/null +++ b/comms/asterisk/patches/patch-res_res__calendar__caldav.c @@ -0,0 +1,13 @@ +$NetBSD: patch-res_res__calendar__caldav.c,v 1.1 2015/05/19 07:52:14 jnemeth Exp $ + +--- res/res_calendar_caldav.c.orig 2014-05-09 22:28:40.000000000 +0000 ++++ res/res_calendar_caldav.c +@@ -403,7 +403,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); + } + } diff --git a/comms/asterisk/patches/patch-res_res__calendar__icalendar.c b/comms/asterisk/patches/patch-res_res__calendar__icalendar.c new file mode 100644 index 00000000000..03faf2c8a18 --- /dev/null +++ b/comms/asterisk/patches/patch-res_res__calendar__icalendar.c @@ -0,0 +1,13 @@ +$NetBSD: patch-res_res__calendar__icalendar.c,v 1.1 2015/05/19 07:52:14 jnemeth Exp $ + +--- res/res_calendar_icalendar.c.orig 2014-05-09 22:28:40.000000000 +0000 ++++ res/res_calendar_icalendar.c +@@ -245,7 +245,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); + } + } diff --git a/comms/asterisk/patches/patch-tests_test__voicemail__api.c b/comms/asterisk/patches/patch-tests_test__voicemail__api.c new file mode 100644 index 00000000000..64a4c0c2342 --- /dev/null +++ b/comms/asterisk/patches/patch-tests_test__voicemail__api.c @@ -0,0 +1,13 @@ +$NetBSD: patch-tests_test__voicemail__api.c,v 1.1 2015/05/19 07:52:14 jnemeth Exp $ + +--- tests/test_voicemail_api.c.orig 2014-07-22 14:00:33.000000000 +0000 ++++ tests/test_voicemail_api.c +@@ -299,7 +299,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)) { diff --git a/comms/asterisk/patches/patch-utils_extconf.c b/comms/asterisk/patches/patch-utils_extconf.c index 8bee852b16a..879c649a195 100644 --- a/comms/asterisk/patches/patch-utils_extconf.c +++ b/comms/asterisk/patches/patch-utils_extconf.c @@ -1,8 +1,8 @@ -$NetBSD: patch-utils_extconf.c,v 1.1 2012/12/11 08:22:49 jnemeth Exp $ +$NetBSD: patch-utils_extconf.c,v 1.2 2015/05/19 07:52:14 jnemeth Exp $ ---- utils/extconf.c.orig 2012-08-01 02:26:53.000000000 +0000 +--- utils/extconf.c.orig 2014-04-01 20:43:57.000000000 +0000 +++ utils/extconf.c -@@ -795,6 +795,10 @@ static void __attribute__((destructor)) +@@ -797,6 +797,10 @@ static void __attribute__((destructor)) #include "libkern/OSAtomic.h" #endif @@ -13,7 +13,7 @@ $NetBSD: patch-utils_extconf.c,v 1.1 2012/12/11 08:22:49 jnemeth Exp $ /*! \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. -@@ -808,12 +812,18 @@ AST_INLINE_API(int ast_atomic_fetchadd_i +@@ -810,12 +814,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), { @@ -34,7 +34,7 @@ $NetBSD: patch-utils_extconf.c,v 1.1 2012/12/11 08:22:49 jnemeth Exp $ #elif defined (__i386__) || defined(__x86_64__) AST_INLINE_API(int ast_atomic_fetchadd_int(volatile int *p, int v), { -@@ -855,6 +865,12 @@ AST_INLINE_API(int ast_atomic_dec_and_te +@@ -857,6 +867,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; @@ -47,3 +47,21 @@ $NetBSD: patch-utils_extconf.c,v 1.1 2012/12/11 08:22:49 jnemeth Exp $ #else AST_INLINE_API(int ast_atomic_dec_and_test(volatile int *p), { +@@ -2820,13 +2836,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; diff --git a/comms/asterisk/patches/patch-utils_smsq.c b/comms/asterisk/patches/patch-utils_smsq.c new file mode 100644 index 00000000000..63a3d058691 --- /dev/null +++ b/comms/asterisk/patches/patch-utils_smsq.c @@ -0,0 +1,13 @@ +$NetBSD: patch-utils_smsq.c,v 1.1 2015/05/19 07:52:14 jnemeth Exp $ + +--- utils/smsq.c.orig 2014-12-17 09:24:50.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) + { |