aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-08-01 17:56:59 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-08-01 17:56:59 +0000
commit5e51fc577edc8ebab3b059ae569f2d5a456969a8 (patch)
tree08368ddc04f75c9bdcfd84dd081448238388d898 /channels
parentf5efde90a846148c64a056ede06d636c5d3c4833 (diff)
Add some fixes for building on Solaris.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@77869 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_iax2.c10
-rw-r--r--channels/chan_mgcp.c2
2 files changed, 6 insertions, 6 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index 7aed23fac..d4d6ac74b 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -1361,7 +1361,7 @@ static void destroy_firmware(struct iax_firmware *cur)
{
/* Close firmware */
if (cur->fwh) {
- munmap(cur->fwh, ntohl(cur->fwh->datalen) + sizeof(*(cur->fwh)));
+ munmap((void*)cur->fwh, ntohl(cur->fwh->datalen) + sizeof(*(cur->fwh)));
}
close(cur->fd);
free(cur);
@@ -1460,7 +1460,7 @@ static int try_firmware(char *s)
close(fd);
return -1;
}
- fwh = mmap(NULL, stbuf.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
+ fwh = (struct ast_iax2_firmware_header*)mmap(NULL, stbuf.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
if (fwh == (void *) -1) {
ast_log(LOG_WARNING, "mmap failed: %s\n", strerror(errno));
close(fd);
@@ -1471,7 +1471,7 @@ static int try_firmware(char *s)
MD5Final(sum, &md5);
if (memcmp(sum, fwh->chksum, sizeof(sum))) {
ast_log(LOG_WARNING, "Firmware file '%s' fails checksum\n", s);
- munmap(fwh, stbuf.st_size);
+ munmap((void*)fwh, stbuf.st_size);
close(fd);
return -1;
}
@@ -1484,7 +1484,7 @@ static int try_firmware(char *s)
break;
/* This version is no newer than what we have. Don't worry about it.
We'll consider it a proper load anyhow though */
- munmap(fwh, stbuf.st_size);
+ munmap((void*)fwh, stbuf.st_size);
close(fd);
return 0;
}
@@ -1500,7 +1500,7 @@ static int try_firmware(char *s)
}
if (cur) {
if (cur->fwh) {
- munmap(cur->fwh, cur->mmaplen);
+ munmap((void*)cur->fwh, cur->mmaplen);
}
if (cur->fd > -1)
close(cur->fd);
diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c
index bda08d7a3..50203a15e 100644
--- a/channels/chan_mgcp.c
+++ b/channels/chan_mgcp.c
@@ -2050,7 +2050,7 @@ static int add_sdp(struct mgcp_request *resp, struct mgcp_subchannel *sub, struc
ast_verbose("We're at %s port %d\n", ast_inet_ntoa(p->parent->ourip), ntohs(sin.sin_port));
}
snprintf(v, sizeof(v), "v=0\r\n");
- snprintf(o, sizeof(o), "o=root %d %d IN IP4 %s\r\n", getpid(), getpid(), ast_inet_ntoa(dest.sin_addr));
+ snprintf(o, sizeof(o), "o=root %d %d IN IP4 %s\r\n", (int)getpid(), (int)getpid(), ast_inet_ntoa(dest.sin_addr));
snprintf(s, sizeof(s), "s=session\r\n");
snprintf(c, sizeof(c), "c=IN IP4 %s\r\n", ast_inet_ntoa(dest.sin_addr));
snprintf(t, sizeof(t), "t=0 0\r\n");