Portability issue - make stringfields work on FreeBSD 4.x (oej/rizzo)
authorOlle Johansson <oej@edvina.net>
Mon, 6 Mar 2006 10:49:15 +0000 (10:49 +0000)
committerOlle Johansson <oej@edvina.net>
Mon, 6 Mar 2006 10:49:15 +0000 (10:49 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12012 65c4cc65-6c06-0410-ace0-fbb531ad65f3

utils.c

diff --git a/utils.c b/utils.c
index ac2d11b..378f74b 100644 (file)
--- a/utils.c
+++ b/utils.c
@@ -1022,7 +1022,11 @@ void __ast_string_field_index_build(struct ast_string_field_mgr *mgr,
        va_list ap1, ap2;
 
        va_start(ap1, format);
+#if defined(__FreeBSD__)
+       va_start(ap2, format);          /* va_copy does not exist on FreeBSD */
+#else
        va_copy(ap2, ap1);
+#endif
 
        needed = vsnprintf(mgr->pool->base + mgr->used, mgr->space, format, ap1) + 1;