From 594ef4e5abf32cd312e6c6d6cfdd2f4c54dbb6c8 Mon Sep 17 00:00:00 2001 From: "David M. Lee" Date: Mon, 26 Aug 2013 21:30:12 +0000 Subject: [PATCH] Fixed bucket.c for systems where tv_usec is not an unsigned long. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@397673 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/bucket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/bucket.c b/main/bucket.c index fd5b091eaf..3ad4765282 100644 --- a/main/bucket.c +++ b/main/bucket.c @@ -901,7 +901,7 @@ static int timeval_str2struct(const struct aco_option *opt, struct ast_variable static int timeval_struct2str(const void *obj, const intptr_t *args, char **buf) { struct timeval *field = (struct timeval *)(obj + args[0]); - return (ast_asprintf(buf, "%lu.%06lu", field->tv_sec, field->tv_usec) < 0) ? -1 : 0; + return (ast_asprintf(buf, "%lu.%06lu", field->tv_sec, (unsigned long)field->tv_usec) < 0) ? -1 : 0; } /*! \brief Initialize bucket support */