diff options
author | Joshua Colp <jcolp@digium.com> | 2007-08-01 18:01:33 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2007-08-01 18:01:33 +0000 |
commit | d9aee5e3532f53f10c324268fe90c20135d9d873 (patch) | |
tree | 2c886b690048568660b1f86f91271c791cbd8104 /channels | |
parent | 28fec17d5943a8cf9a8819a613e8dec74c9b5189 (diff) |
Merged revisions 77869 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r77869 | file | 2007-08-01 14:56:59 -0300 (Wed, 01 Aug 2007) | 2 lines
Add some fixes for building on Solaris.
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77870 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_iax2.c | 10 | ||||
-rw-r--r-- | channels/chan_mgcp.c | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 7e02d0e55..bf98e56c0 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -1511,7 +1511,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); ast_free(cur); @@ -1607,7 +1607,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); @@ -1618,7 +1618,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; } @@ -1631,7 +1631,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; } @@ -1644,7 +1644,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); cur->fwh = fwh; diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c index 2490cb1c0..ddb811ed3 100644 --- a/channels/chan_mgcp.c +++ b/channels/chan_mgcp.c @@ -2061,7 +2061,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"); |