build fix on windows.

git-svn-id: http://svn.openzap.org/svn/openzap/trunk@208 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
Michael Jerris 2007-06-04 23:44:18 +00:00
parent de0a5c3b07
commit 4ec6fab273
1 changed files with 7 additions and 2 deletions

View File

@ -34,6 +34,9 @@
#include "openzap.h" #include "openzap.h"
#include "zap_isdn.h" #include "zap_isdn.h"
#include <stdarg.h> #include <stdarg.h>
#ifdef WIN32
#include <io.h>
#endif
#ifdef ZAP_WANPIPE_SUPPORT #ifdef ZAP_WANPIPE_SUPPORT
#include "zap_wanpipe.h" #include "zap_wanpipe.h"
#endif #endif
@ -1255,7 +1258,8 @@ zap_status_t zap_channel_read(zap_channel_t *zchan, void *data, zap_size_t *data
status = zchan->zio->read(zchan, data, datalen); status = zchan->zio->read(zchan, data, datalen);
if (zchan->fds[0]) { if (zchan->fds[0]) {
write(zchan->fds[0], data, *datalen); unsigned int dlen = (unsigned int) *datalen;
write(zchan->fds[0], data, dlen);
} }
if (status == ZAP_SUCCESS && zap_test_flag(zchan, ZAP_CHANNEL_TRANSCODE) && zchan->effective_codec != zchan->native_codec) { if (status == ZAP_SUCCESS && zap_test_flag(zchan, ZAP_CHANNEL_TRANSCODE) && zchan->effective_codec != zchan->native_codec) {
@ -1433,7 +1437,8 @@ zap_status_t zap_channel_write(zap_channel_t *zchan, void *data, zap_size_t data
} }
if (zchan->fds[1]) { if (zchan->fds[1]) {
write(zchan->fds[1], data, *datalen); unsigned int dlen = (unsigned int) *datalen;
write(zchan->fds[1], data, dlen);
} }
status = zchan->zio->write(zchan, data, datalen); status = zchan->zio->write(zchan, data, datalen);