]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
fix Bus Error on sparc (issue #6354)
authorRussell Bryant <russell@russellbryant.com>
Tue, 28 Mar 2006 19:47:03 +0000 (19:47 +0000)
committerRussell Bryant <russell@russellbryant.com>
Tue, 28 Mar 2006 19:47:03 +0000 (19:47 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@15703 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_iax2.c

index 8b599d4c88e65a99c06be0886697146ebf347455..2412ca9a1c11628440cb08042aadd7bdd9a7d1da 100644 (file)
@@ -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)