aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-03-28 19:47:03 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-03-28 19:47:03 +0000
commiteedd93f836609119935a16fd59499e4573fa843e (patch)
treeb9b8efc693c09ba879d279de0b81482a4d8821e5
parent7b00a68590adc07cff8d1d4161a1ee7e0efef46b (diff)
fix Bus Error on sparc (issue #6354)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@15703 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--channels/chan_iax2.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index 8b599d4c8..2412ca9a1 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -40,6 +40,7 @@
#include <sys/signal.h>
#include <signal.h>
#include <string.h>
+#include <strings.h>
#include <errno.h>
#include <unistd.h>
#include <netdb.h>
@@ -5294,7 +5295,7 @@ static int try_transfer(struct chan_iax2_pvt *pvt, struct iax_ies *ies)
memset(&ied, 0, sizeof(ied));
if (ies->apparent_addr)
- memcpy(&new, ies->apparent_addr, sizeof(new));
+ bcopy(ies->apparent_addr, &new, sizeof(new));
if (ies->callno)
newcall = ies->callno;
if (!newcall || !new.sin_addr.s_addr || !new.sin_port) {
@@ -5445,7 +5446,7 @@ static int iax2_ack_registry(struct iax_ies *ies, struct sockaddr_in *sin, int c
memset(&us, 0, sizeof(us));
if (ies->apparent_addr)
- memcpy(&us, ies->apparent_addr, sizeof(us));
+ bcopy(ies->apparent_addr, &us, sizeof(us));
if (ies->username)
ast_copy_string(peer, ies->username, sizeof(peer));
if (ies->refresh)