From 847b7a6236a517d52f4dbc673ef5adce6723eb36 Mon Sep 17 00:00:00 2001 From: tilghman Date: Tue, 2 Dec 2008 00:25:16 +0000 Subject: Ensure that Asterisk builds with --enable-dev-mode, even on the latest gcc and glibc. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@160207 f38db490-d61c-443f-a65b-d21fe96a405b --- include/asterisk/stringfields.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/asterisk/stringfields.h b/include/asterisk/stringfields.h index 97e65532d..ac9481156 100644 --- a/include/asterisk/stringfields.h +++ b/include/asterisk/stringfields.h @@ -242,8 +242,10 @@ void __ast_string_field_index_build_va(struct ast_string_field_mgr *mgr, if ((__zz__[0] != 0) && (__dlen__ <= (strlen(__zz__) + 1))) { \ memcpy(__zz__, data, __dlen__); \ } else { \ - if (((x)->__begin_field[index] = __ast_string_field_alloc_space(&(x)->__field_mgr, __dlen__, &(x)->__begin_field[0], ast_string_field_count(x)))) \ - memcpy((char*) (x)->__begin_field[index], data, __dlen__); \ + if (((x)->__begin_field[index] = __ast_string_field_alloc_space(&(x)->__field_mgr, __dlen__, &(x)->__begin_field[0], ast_string_field_count(x)))) { \ + char *__yy__ = (char *) (x)->__begin_field[index]; \ + memcpy(__yy__, data, __dlen__); \ + } \ } \ } \ } while (0) -- cgit v1.2.3