OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /v/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 08-Sep-2006 08:45:40
Branch: HEAD Handle: 2006090807454000
Modified files:
openpkg-src/asterisk asterisk.patch
Log:
fix a bunch of potential segfaults
Summary:
Revision Changes Path
1.8 +346 -22 openpkg-src/asterisk/asterisk.patch
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/asterisk/asterisk.patch
============================================================================
$ cvs diff -u -r1.7 -r1.8 asterisk.patch
--- openpkg-src/asterisk/asterisk.patch 6 Sep 2006 06:38:31 -0000
1.7
+++ openpkg-src/asterisk/asterisk.patch 8 Sep 2006 06:45:40 -0000
1.8
@@ -1,6 +1,6 @@
Index: Makefile
--- Makefile.orig 2006-06-29 21:23:18 +0200
-+++ Makefile 2006-09-06 08:25:09 +0200
++++ Makefile 2006-09-08 08:39:22 +0200
@@ -110,35 +110,19 @@
# Don't use together with -DBUSYDETECT_TONEONLY
BUSYDETECT+= #-DBUSYDETECT_COMPARE_TONE_AND_SILENCE
@@ -112,7 +112,7 @@
endif
Index: agi/Makefile
--- agi/Makefile.orig 2006-03-28 22:22:05 +0200
-+++ agi/Makefile 2006-09-06 08:25:09 +0200
++++ agi/Makefile 2006-09-08 08:39:22 +0200
@@ -20,9 +20,7 @@
LIBS=-lsocket -lnsl ../strcompat.o
endif
@@ -126,7 +126,7 @@
Index: app_conference/Makefile
--- app_conference/Makefile.orig 2005-10-27 19:53:35 +0200
-+++ app_conference/Makefile 2006-09-06 08:25:09 +0200
++++ app_conference/Makefile 2006-09-08 08:39:22 +0200
@@ -20,10 +20,10 @@
INSTALL_PREFIX := /opt/horizon
INSTALL_MODULES_DIR := $(INSTALL_PREFIX)/lib/asterisk/modules
@@ -186,8 +186,16 @@
# cp conf.conf /etc/asterisk/
Index: app_conference/conference.c
--- app_conference/conference.c.orig 2005-10-27 19:53:35 +0200
-+++ app_conference/conference.c 2006-09-06 08:25:09 +0200
-@@ -618,7 +618,7 @@
++++ app_conference/conference.c 2006-09-08 08:43:40 +0200
+@@ -568,7 +568,6 @@
+ conf->memberlist = NULL ;
+
+ conf->membercount = 0 ;
+- conf->conference_thread = -1 ;
+
+ conf->debug_flag = 0 ;
+
+@@ -618,7 +617,7 @@
// acquire conference mutexes
ast_mutex_lock( &conf->lock ) ;
@@ -196,9 +204,18 @@
{
// detach the thread so it doesn't leak
pthread_detach( conf->conference_thread ) ;
+@@ -632,8 +631,6 @@
+ {
+ ast_log( LOG_ERROR, "unable to start conference thread for
conference %s\n", conf->name ) ;
+
+- conf->conference_thread = -1 ;
+-
+ // release conference mutexes
+ ast_mutex_unlock( &conf->lock ) ;
+
Index: apps/Makefile
--- apps/Makefile.orig 2006-04-30 15:38:22 +0200
-+++ apps/Makefile 2006-09-06 08:25:09 +0200
++++ apps/Makefile 2006-09-08 08:39:22 +0200
@@ -54,16 +54,11 @@
APPS+=app_osplookup.so
endif
@@ -222,7 +239,7 @@
CYGSOLINK=-Wl,[EMAIL PROTECTED] -Wl,--export-all-symbols
Index: asterisk-addons-1.2.4/Makefile
--- asterisk-addons-1.2.4/Makefile.orig 2005-12-02 00:14:28 +0100
-+++ asterisk-addons-1.2.4/Makefile 2006-09-06 08:25:09 +0200
++++ asterisk-addons-1.2.4/Makefile 2006-09-08 08:39:22 +0200
@@ -27,17 +27,9 @@
#
# MySQL stuff... Autoconf anyone??
@@ -246,7 +263,7 @@
Index: asterisk.c
--- asterisk.c.orig 2006-08-22 00:34:26 +0200
-+++ asterisk.c 2006-09-06 08:31:47 +0200
++++ asterisk.c 2006-09-08 08:39:22 +0200
@@ -1902,9 +1902,9 @@
} else if (!strcasecmp(v->name, "astspooldir")) {
ast_copy_string(ast_config_AST_SPOOL_DIR, v->value,
sizeof(ast_config_AST_SPOOL_DIR));
@@ -260,7 +277,7 @@
ast_copy_string(ast_config_AST_LOG_DIR, v->value,
sizeof(ast_config_AST_LOG_DIR));
Index: build_tools/make_defaults_h
--- build_tools/make_defaults_h.orig 2005-06-20 19:26:08 +0200
-+++ build_tools/make_defaults_h 2006-09-06 08:32:28 +0200
++++ build_tools/make_defaults_h 2006-09-08 08:39:22 +0200
@@ -14,7 +14,7 @@
#define AST_LOG_DIR "${INSTALL_PATH}${ASTLOGDIR}"
#define AST_AGI_DIR "${INSTALL_PATH}${AGI_DIR}"
@@ -272,7 +289,7 @@
#define AST_CONFIG_FILE "${INSTALL_PATH}${ASTCONFPATH}"
Index: cdr/Makefile
--- cdr/Makefile.orig 2006-04-30 16:27:56 +0200
-+++ cdr/Makefile 2006-09-06 08:25:09 +0200
++++ cdr/Makefile 2006-09-08 08:39:22 +0200
@@ -20,10 +20,8 @@
CFLAGS+=-fPIC
endif
@@ -288,7 +305,7 @@
#This works for even old (2.96) versions of gcc and provides a small boost
either way.
Index: channels/Makefile
--- channels/Makefile.orig 2006-08-17 23:57:19 +0200
-+++ channels/Makefile 2006-09-06 08:25:09 +0200
++++ channels/Makefile 2006-09-08 08:39:22 +0200
@@ -21,9 +21,7 @@
#CHANNEL_LIBS+=chan_modem.so chan_modem_aopen.so chan_modem_bestdata.so
endif
@@ -302,7 +319,7 @@
PTLIB=-lpt_OpenBSD_x86_r
Index: channels/chan_h323.c
--- channels/chan_h323.c.orig 2006-08-05 07:08:50 +0200
-+++ channels/chan_h323.c 2006-09-06 08:25:09 +0200
++++ channels/chan_h323.c 2006-09-08 08:39:22 +0200
@@ -31,6 +31,7 @@
* \ingroup channel_drivers
*/
@@ -311,9 +328,59 @@
#include <sys/socket.h>
#include <sys/signal.h>
#include <sys/param.h>
+Index: channels/chan_iax2.c
+--- channels/chan_iax2.c.orig 2006-08-05 07:08:50 +0200
++++ channels/chan_iax2.c 2006-09-08 08:39:22 +0200
+@@ -2606,7 +2606,7 @@
+ struct ast_variable *var;
+ struct ast_variable *tmp;
+ struct iax2_peer *peer=NULL;
+- time_t regseconds, nowtime;
++ time_t regseconds = 0, nowtime;
+ int dynamic=0;
+
+ if (peername)
+@@ -2647,8 +2647,10 @@
+ break;
+ }
+ } else if (!strcasecmp(tmp->name, "regseconds")) {
+- if (sscanf(tmp->value, "%ld", (time_t *)®seconds) !=
1)
+- regseconds = 0;
++ long s;
++ if (sscanf(tmp->value, "%ld", &s) != 1)
++ s = 0;
++ regseconds = s;
+ } else if (!strcasecmp(tmp->name, "ipaddr")) {
+ inet_aton(tmp->value, &(peer->addr.sin_addr));
+ } else if (!strcasecmp(tmp->name, "port")) {
+Index: channels/chan_sip.c
+--- channels/chan_sip.c.orig 2006-08-20 06:49:48 +0200
++++ channels/chan_sip.c 2006-09-08 08:39:22 +0200
+@@ -12232,7 +12232,7 @@
+ int obproxyfound=0;
+ int found=0;
+ int format=0; /* Ama flags */
+- time_t regseconds;
++ time_t regseconds = 0;
+ char *varname = NULL, *varval = NULL;
+ struct ast_variable *tmpvar = NULL;
+ struct ast_flags peerflags = {(0)};
+@@ -12315,8 +12315,10 @@
+ }
+
+ if (realtime && !strcasecmp(v->name, "regseconds")) {
+- if (sscanf(v->value, "%ld", (time_t *)®seconds) != 1)
+- regseconds = 0;
++ long s;
++ if (sscanf(v->value, "%ld", &s) != 1)
++ s = 0;
++ regseconds = (time_t)s;
+ } else if (realtime && !strcasecmp(v->name, "ipaddr") &&
!ast_strlen_zero(v->value) ) {
+ inet_aton(v->value, &(peer->addr.sin_addr));
+ } else if (realtime && !strcasecmp(v->name, "name"))
Index: channels/chan_skinny.c
--- channels/chan_skinny.c.orig 2006-08-05 07:08:50 +0200
-+++ channels/chan_skinny.c 2006-09-06 08:25:09 +0200
++++ channels/chan_skinny.c 2006-09-08 08:39:22 +0200
@@ -99,7 +99,7 @@
#define htolel(x) (x)
#define htoles(x) (x)
@@ -325,7 +392,7 @@
(((x) & 0x00ff) << 8))
Index: codecs/Makefile
--- codecs/Makefile.orig 2005-11-29 19:24:39 +0100
-+++ codecs/Makefile 2006-09-06 08:25:09 +0200
++++ codecs/Makefile 2006-09-08 08:39:22 +0200
@@ -28,45 +28,16 @@
LIBG723B=g723.1b/libg723b.a
endif
@@ -376,9 +443,44 @@
CODECS+=$(MODG723) $(MODSPEEX) $(MODILBC) codec_gsm.so codec_lpc10.so \
codec_adpcm.so codec_ulaw.so codec_alaw.so codec_a_mu.so \
+Index: codecs/gsm/src/preprocess.c
+--- codecs/gsm/src/preprocess.c.orig 2005-11-29 19:24:39 +0100
++++ codecs/gsm/src/preprocess.c 2006-09-08 08:39:22 +0200
+@@ -46,8 +46,6 @@
+
+ word SO;
+
+- ulongword utmp; /* for L_ADD */
+-
+ register int k = 160;
+
+ while (k--) {
+Index: codecs/gsm/src/short_term.c
+--- codecs/gsm/src/short_term.c.orig 2005-11-29 19:24:39 +0100
++++ codecs/gsm/src/short_term.c 2006-09-08 08:39:22 +0200
+@@ -373,7 +373,6 @@
+ word * LARpp_j_1 = S->LARpp[ S->j ^= 1 ];
+
+ word LARp[8];
+-int i;
+ #undef FILTER
+ #if defined(FAST) && defined(USE_FLOAT_MUL)
+ # define FILTER (* (S->fast \
+Index: codecs/lpc10/analys.c
+--- codecs/lpc10/analys.c.orig 2005-11-29 19:24:39 +0100
++++ codecs/lpc10/analys.c 2006-09-08 08:39:22 +0200
+@@ -32,7 +32,7 @@
+
+ #include "f2c.h"
+
+-#ifdef P_R_O_T_O_T_Y_P_E_S
++#if 1
+ extern int analys_(real *speech, integer *voice, integer *pitch, real *rms,
real *rc, struct lpc10_encoder_state *st);
+ /* comlen contrl_ 12 */
+ /*:ref: preemp_ 14 5 6 6 4 6 6 */
Index: formats/Makefile
--- formats/Makefile.orig 2005-11-29 19:24:39 +0100
-+++ formats/Makefile 2006-09-06 08:25:09 +0200
++++ formats/Makefile 2006-09-08 08:39:22 +0200
@@ -29,9 +29,7 @@
FORMAT_LIBS+=format_ogg_vorbis.so
endif
@@ -390,9 +492,20 @@
GSMLIB=../codecs/gsm/lib/libgsm.a
+Index: formats/msgsm.h
+--- formats/msgsm.h.orig 2005-11-29 19:24:39 +0100
++++ formats/msgsm.h 2006-09-08 08:39:22 +0200
+@@ -562,6 +562,7 @@
+ xmc[46] = sr & 0x7; sr >>= 3;
+ xmc[47] = sr & 0x7; sr >>= 3;
+ sr = *c++;
++ /* FIXME: 48? */
+ xmc[49] = sr & 0x7; sr >>= 3;
+ sr |= (uword)*c++ << 2;
+ xmc[50] = sr & 0x7; sr >>= 3;
Index: frame.c
--- frame.c.orig 2006-07-31 06:06:16 +0200
-+++ frame.c 2006-09-06 08:25:09 +0200
++++ frame.c 2006-09-08 08:39:22 +0200
@@ -1055,7 +1055,7 @@
{
switch(buf & TYPE_MASK) {
@@ -404,7 +517,7 @@
return 4;
Index: funcs/Makefile
--- funcs/Makefile.orig 2005-11-29 19:24:39 +0100
-+++ funcs/Makefile 2006-09-06 08:25:09 +0200
++++ funcs/Makefile 2006-09-08 08:39:22 +0200
@@ -40,9 +40,7 @@
CFLAGS+=-fPIC
endif
@@ -418,7 +531,7 @@
Index: pbx/Makefile
--- pbx/Makefile.orig 2005-11-29 19:24:39 +0100
-+++ pbx/Makefile 2006-09-06 08:25:09 +0200
++++ pbx/Makefile 2006-09-08 08:39:22 +0200
@@ -14,9 +14,7 @@
PBX_LIBS=pbx_config.so pbx_spool.so pbx_dundi.so pbx_loopback.so
pbx_realtime.so \
pbx_ael.so
@@ -432,7 +545,7 @@
#PBX_LIBS+=$(shell $(CROSS_COMPILE_BIN)gtk-config --cflags >/dev/null
2>/dev/null && echo "pbx_gtkconsole.so")
Index: res/Makefile
--- res/Makefile.orig 2005-11-29 19:24:39 +0100
-+++ res/Makefile 2006-09-06 08:25:09 +0200
++++ res/Makefile 2006-09-08 08:39:22 +0200
@@ -36,10 +36,8 @@
endif
endif
@@ -446,9 +559,28 @@
ifeq (${OSARCH},CYGWIN)
CYGSOLINK=-Wl,[EMAIL PROTECTED] -Wl,--export-all-symbols
+Index: res/res_features.c
+--- res/res_features.c.orig 2006-08-02 01:07:06 +0200
++++ res/res_features.c 2006-09-08 08:39:22 +0200
+@@ -505,13 +505,13 @@
+ if (touch_monitor) {
+ len = strlen(touch_monitor) + 50;
+ args = alloca(len);
+- snprintf(args, len, "%s|auto-%ld-%s|m", (touch_format)
? touch_format : "wav", time(NULL), touch_monitor);
++ snprintf(args, len, "%s|auto-%ld-%s|m", (touch_format)
? touch_format : "wav", (long)time(NULL), touch_monitor);
+ } else {
+ caller_chan_id = ast_strdupa(caller_chan->cid.cid_num ?
caller_chan->cid.cid_num : caller_chan->name);
+ callee_chan_id = ast_strdupa(callee_chan->cid.cid_num ?
callee_chan->cid.cid_num : callee_chan->name);
+ len = strlen(caller_chan_id) + strlen(callee_chan_id) +
50;
+ args = alloca(len);
+- snprintf(args, len, "%s|auto-%ld-%s-%s|m",
(touch_format) ? touch_format : "wav", time(NULL), caller_chan_id,
callee_chan_id);
++ snprintf(args, len, "%s|auto-%ld-%s-%s|m",
(touch_format) ? touch_format : "wav", (long)time(NULL), caller_chan_id,
callee_chan_id);
+ }
+
+ for( x = 0; x < strlen(args); x++)
Index: rtp.c
--- rtp.c.orig 2006-07-13 20:44:17 +0200
-+++ rtp.c 2006-09-06 08:25:09 +0200
++++ rtp.c 2006-09-08 08:39:22 +0200
@@ -962,8 +962,10 @@
rtp->us.sin_port = htons(x);
rtp->us.sin_addr = addr;
@@ -461,9 +593,201 @@
/* Try to bind it/them. */
if (!(first = bind(rtp->s, (struct sockaddr *)&rtp->us,
sizeof(rtp->us))) &&
(!rtp->rtcp || !bind(rtp->rtcp->s, (struct sockaddr
*)&rtp->rtcp->us, sizeof(rtp->rtcp->us))))
+Index: say.c
+--- say.c.orig 2005-11-29 19:24:39 +0100
++++ say.c 2006-09-08 08:39:22 +0200
+@@ -3133,7 +3133,7 @@
+ time_t beg_today;
+
+ gettimeofday(&now,NULL);
+-
ast_localtime(&now.tv_sec,&tmnow,timezone);
++ { time_t t = (time_t)now.tv_sec;
ast_localtime(&t,&tmnow,timezone); }
+ /* This might be slightly off, if we
transcend a leap second, but never more off than 1 second */
+ /* In any case, it saves not having to
do ast_mktime() */
+ beg_today = now.tv_sec - (tmnow.tm_hour
* 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
+@@ -3156,7 +3156,7 @@
+ time_t beg_today;
+
+ gettimeofday(&now,NULL);
+-
ast_localtime(&now.tv_sec,&tmnow,timezone);
++ { time_t t = (time_t)now.tv_sec;
ast_localtime(&t,&tmnow,timezone); }
+ /* This might be slightly off, if we
transcend a leap second, but never more off than 1 second */
+ /* In any case, it saves not having to
do ast_mktime() */
+ beg_today = now.tv_sec - (tmnow.tm_hour
* 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
+@@ -3332,7 +3332,7 @@
+ time_t beg_today;
+
+ gettimeofday(&now,NULL);
+-
ast_localtime(&now.tv_sec,&tmnow,timezone);
++ { time_t t = (time_t)now.tv_sec;
ast_localtime(&t,&tmnow,timezone); }
+ /* This might be slightly off, if we
transcend a leap second, but never more off than 1 second */
+ /* In any case, it saves not having to
do ast_mktime() */
+ beg_today = now.tv_sec - (tmnow.tm_hour
* 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
+@@ -3355,7 +3355,7 @@
+ time_t beg_today;
+
+ gettimeofday(&now,NULL);
+-
ast_localtime(&now.tv_sec,&tmnow,timezone);
++ { time_t t = (time_t)now.tv_sec;
ast_localtime(&t,&tmnow,timezone); }
+ /* This might be slightly off, if we
transcend a leap second, but never more off than 1 second */
+ /* In any case, it saves not having to
do ast_mktime() */
+ beg_today = now.tv_sec - (tmnow.tm_hour
* 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
+@@ -3524,7 +3524,7 @@
+ time_t beg_today;
+
+ gettimeofday(&now,NULL);
+-
ast_localtime(&now.tv_sec,&tmnow,timezone);
++ { time_t t = (time_t)now.tv_sec;
ast_localtime(&t,&tmnow,timezone); }
+ /* This might be slightly off, if we
transcend a leap second, but never more off than 1 second */
+ /* In any case, it saves not having to
do ast_mktime() */
+ beg_today = now.tv_sec - (tmnow.tm_hour
* 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
+@@ -3547,7 +3547,7 @@
+ time_t beg_today;
+
+ gettimeofday(&now,NULL);
+-
ast_localtime(&now.tv_sec,&tmnow,timezone);
++ { time_t t = (time_t)now.tv_sec;
ast_localtime(&t,&tmnow,timezone); }
+ /* This might be slightly off, if we
transcend a leap second, but never more off than 1 second */
+ /* In any case, it saves not having to
do ast_mktime() */
+ beg_today = now.tv_sec - (tmnow.tm_hour
* 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
+@@ -3727,7 +3727,7 @@
+ char todo = format[offset]; /* The
letter to format*/
+
+ gettimeofday(&now,NULL);
+-
ast_localtime(&now.tv_sec,&tmnow,timezone);
++ { time_t t = (time_t)now.tv_sec;
ast_localtime(&t,&tmnow,timezone); }
+ /* This might be slightly off, if we
transcend a leap second, but never more off than 1 second */
+ /* In any case, it saves not having to
do ast_mktime() */
+ beg_today = now.tv_sec - (tmnow.tm_hour
* 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
+@@ -3883,7 +3883,7 @@
+ time_t beg_today;
+
+ gettimeofday(&now,NULL);
+-
ast_localtime(&now.tv_sec,&tmnow,timezone);
++ { time_t t = (time_t)now.tv_sec;
ast_localtime(&t,&tmnow,timezone); }
+ /* This might be slightly off, if we
transcend a leap second, but never more off than 1 second */
+ /* In any case, it saves not having to
do ast_mktime() */
+ beg_today = now.tv_sec - (tmnow.tm_hour
* 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
+@@ -3906,7 +3906,7 @@
+ time_t beg_today;
+
+ gettimeofday(&now,NULL);
+-
ast_localtime(&now.tv_sec,&tmnow,timezone);
++ { time_t t = (time_t)now.tv_sec;
ast_localtime(&t,&tmnow,timezone); }
+ /* This might be slightly off, if we
transcend a leap second, but never more off than 1 second */
+ /* In any case, it saves not having to
do ast_mktime() */
+ beg_today = now.tv_sec - (tmnow.tm_hour
* 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
+@@ -4101,7 +4101,7 @@
+ time_t beg_today;
+
+ gettimeofday(&now,NULL);
+-
ast_localtime(&now.tv_sec,&tmnow,timezone);
++ { time_t t = (time_t)now.tv_sec;
ast_localtime(&t,&tmnow,timezone); }
+ /* This might be slightly off, if we
transcend a leap second, but never more off than 1 second */
+ /* In any case, it saves not having to
do ast_mktime() */
+ beg_today = now.tv_sec - (tmnow.tm_hour
* 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
+@@ -4124,7 +4124,7 @@
+ time_t beg_today;
+
+ gettimeofday(&now,NULL);
+-
ast_localtime(&now.tv_sec,&tmnow,timezone);
++ { time_t t = (time_t)now.tv_sec;
ast_localtime(&t,&tmnow,timezone); }
+ /* This might be slightly off, if we
transcend a leap second, but never more off than 1 second */
+ /* In any case, it saves not having to
do ast_mktime() */
+ beg_today = now.tv_sec - (tmnow.tm_hour
* 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
+@@ -4303,7 +4303,7 @@
+ time_t beg_today;
+
+ gettimeofday(&now,NULL);
+-
ast_localtime(&now.tv_sec,&tmnow,timezone);
++ { time_t t = (time_t)now.tv_sec;
ast_localtime(&t,&tmnow,timezone); }
+ /* This might be slightly off, if we
transcend a leap second, but never more off than 1 second */
+ /* In any case, it saves not having to
do ast_mktime() */
+ beg_today = now.tv_sec - (tmnow.tm_hour
* 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
+@@ -4326,7 +4326,7 @@
+ time_t beg_today;
+
+ gettimeofday(&now,NULL);
+-
ast_localtime(&now.tv_sec,&tmnow,timezone);
++ { time_t t = (time_t)now.tv_sec;
ast_localtime(&t,&tmnow,timezone); }
+ /* This might be slightly off, if we
transcend a leap second, but never more off than 1 second */
+ /* In any case, it saves not having to
do ast_mktime() */
+ beg_today = now.tv_sec - (tmnow.tm_hour
* 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
+@@ -4528,7 +4528,7 @@
+ time_t beg_today;
+
+ gettimeofday(&now,NULL);
+-
ast_localtime(&now.tv_sec,&tmnow,timezone);
++ { time_t t = (time_t)now.tv_sec;
ast_localtime(&t,&tmnow,timezone); }
+ /* This might be slightly off, if we
transcend a leap second, but never more off than 1 second */
+ /* In any case, it saves not having to
do ast_mktime() */
+ beg_today = now.tv_sec - (tmnow.tm_hour
* 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
+@@ -4551,7 +4551,7 @@
+ time_t beg_today;
+
+ gettimeofday(&now,NULL);
+-
ast_localtime(&now.tv_sec,&tmnow,timezone);
++ { time_t t = (time_t)now.tv_sec;
ast_localtime(&t,&tmnow,timezone); }
+ /* This might be slightly off, if we
transcend a leap second, but never more off than 1 second */
+ /* In any case, it saves not having to
do ast_mktime() */
+ beg_today = now.tv_sec - (tmnow.tm_hour
* 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
+@@ -4740,7 +4740,7 @@
+ time_t beg_today;
+
+ gettimeofday(&now,NULL);
+-
ast_localtime(&now.tv_sec,&tmnow,timezone);
++ { time_t t = (time_t)now.tv_sec;
ast_localtime(&t,&tmnow,timezone); }
+ /* This might be slightly off, if we
transcend a leap second, but never more off than 1 second */
+ /* In any case, it saves not having to
do ast_mktime() */
+ beg_today = now.tv_sec - (tmnow.tm_hour
* 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
+@@ -4763,7 +4763,7 @@
+ time_t beg_today;
+
+ gettimeofday(&now,NULL);
+-
ast_localtime(&now.tv_sec,&tmnow,timezone);
++ { time_t t = (time_t)now.tv_sec;
ast_localtime(&t,&tmnow,timezone); }
+ /* This might be slightly off, if we
transcend a leap second, but never more off than 1 second */
+ /* In any case, it saves not having to
do ast_mktime() */
+ beg_today = now.tv_sec - (tmnow.tm_hour
* 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
+@@ -5010,7 +5010,7 @@
+ time_t beg_today;
+
+ gettimeofday(&now,NULL);
+-
ast_localtime(&now.tv_sec,&tmnow,timezone);
++ { time_t t = (time_t)now.tv_sec;
ast_localtime(&t,&tmnow,timezone); }
+ /* This might be slightly off, if we
transcend a leap second, but never more off than 1 second */
+ /* In any case, it saves not having to
do ast_mktime() */
+ beg_today = now.tv_sec - (tmnow.tm_hour
* 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
+@@ -5033,7 +5033,7 @@
+ time_t beg_today;
+
+ gettimeofday(&now,NULL);
+-
ast_localtime(&now.tv_sec,&tmnow,timezone);
++ { time_t t = (time_t)now.tv_sec;
ast_localtime(&t,&tmnow,timezone); }
+ /* This might be slightly off, if we
transcend a leap second, but never more off than 1 second */
+ /* In any case, it saves not having to
do ast_mktime() */
+ beg_today = now.tv_sec - (tmnow.tm_hour
* 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
+@@ -6043,7 +6043,7 @@
+ time_t beg_today;
+
+ gettimeofday(&now,NULL);
+- ast_localtime(&now.tv_sec,&tmnow,timezone);
++ { time_t t = (time_t)now.tv_sec;
ast_localtime(&t,&tmnow,timezone); }
+ /* This might be slightly off, if we transcend
a leap second, but never more off than 1 second */
+ /* In any case, it saves not having to do
ast_mktime() */
+ beg_today = now.tv_sec - (tmnow.tm_hour * 3600)
- (tmnow.tm_min * 60) - (tmnow.tm_sec);
+@@ -6066,7 +6066,7 @@
+ time_t beg_today;
+
+ gettimeofday(&now,NULL);
+- ast_localtime(&now.tv_sec,&tmnow,timezone);
++ { time_t t = (time_t)now.tv_sec;
ast_localtime(&t,&tmnow,timezone); }
+ /* This might be slightly off, if we transcend
a leap second, but never more off than 1 second */
+ /* In any case, it saves not having to do
ast_mktime() */
+ beg_today = now.tv_sec - (tmnow.tm_hour * 3600)
- (tmnow.tm_min * 60) - (tmnow.tm_sec);
Index: utils.c
--- utils.c.orig 2006-07-12 15:54:10 +0200
-+++ utils.c 2006-09-06 08:25:09 +0200
++++ utils.c 2006-09-08 08:39:22 +0200
@@ -58,7 +58,10 @@
static char base64[64];
static char b2a[256];
@@ -478,7 +802,7 @@
#define ERANGE 34
Index: utils/Makefile
--- utils/Makefile.orig 2005-11-29 19:24:39 +0100
-+++ utils/Makefile 2006-09-06 08:25:09 +0200
++++ utils/Makefile 2006-09-08 08:39:22 +0200
@@ -16,17 +16,15 @@
#
CFLAGS+=-DNO_AST_MM
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [email protected]