Commit 0c086e3c authored by Ghislain MARY's avatar Ghislain MARY

Fix compilation for win32native with Visual Studio.

parent 5779aa06
......@@ -210,6 +210,10 @@
RelativePath="..\..\src\jitterctl.c"
>
</File>
<File
RelativePath="..\..\src\logging.c"
>
</File>
<File
RelativePath="..\..\src\netsim.c"
>
......@@ -246,6 +250,10 @@
RelativePath="..\..\src\rtpparse.c"
>
</File>
<File
RelativePath="..\..\src\rtpprofile.c"
>
</File>
<File
RelativePath="..\..\src\rtpsession.c"
>
......@@ -312,6 +320,10 @@
RelativePath="..\..\src\jitterctl.h"
>
</File>
<File
RelativePath="..\..\include\ortp\logging.h"
>
</File>
<File
RelativePath="..\..\src\ortp-config-win32.h"
>
......@@ -344,6 +356,10 @@
RelativePath="..\..\src\rtpmod.h"
>
</File>
<File
RelativePath="..\..\include\ortp\rtpprofile.h"
>
</File>
<File
RelativePath="..\..\include\ortp\rtpsession.h"
>
......
......@@ -27,6 +27,7 @@
#include "ortp/logging.h"
#include "ortp/port.h"
#include "ortp/str_utils.h"
#include "utils.h"
#if defined(_WIN32) && !defined(_WIN32_WCE)
#include <process.h>
......
......@@ -59,6 +59,7 @@ typedef WSACMSGHDR *LPWSACMSGHDR;
#define WSA_CMSG_FIRSTHDR(msg) (((msg)->Control.len >= sizeof(WSACMSGHDR)) ? (LPWSACMSGHDR)(msg)->Control.buf : (LPWSACMSGHDR)NULL)
#define WSA_CMSG_NXTHDR(msg,cmsg) ((!(cmsg)) ? WSA_CMSG_FIRSTHDR(msg) : ((((u_char *)(cmsg) + WSA_CMSGHDR_ALIGN((cmsg)->cmsg_len) + sizeof(WSACMSGHDR)) > (u_char *)((msg)->Control.buf) + (msg)->Control.len) ? (LPWSACMSGHDR)NULL : (LPWSACMSGHDR)((u_char *)(cmsg) + WSA_CMSGHDR_ALIGN((cmsg)->cmsg_len))))
#define WSA_CMSG_DATA(cmsg) ((u_char *)(cmsg) + WSA_CMSGDATA_ALIGN(sizeof(WSACMSGHDR)))
#endif
#undef CMSG_FIRSTHDR
#define CMSG_FIRSTHDR WSA_CMSG_FIRSTHDR
#undef CMSG_NXTHDR
......@@ -68,7 +69,6 @@ typedef WSACMSGHDR *LPWSACMSGHDR;
typedef INT (WINAPI * LPFN_WSARECVMSG)(SOCKET, LPWSAMSG, LPDWORD, LPWSAOVERLAPPED, LPWSAOVERLAPPED_COMPLETION_ROUTINE);
static LPFN_WSARECVMSG ortp_WSARecvMsg = NULL;
#endif
#endif
static bool_t try_connect(int fd, const struct sockaddr *dest, socklen_t addrlen){
if (connect(fd,dest,addrlen)<0){
......@@ -1164,7 +1164,7 @@ int rtp_session_rtp_recv_abstract(ortp_socket_t socket, mblk_t *msg, int flags,
}
#endif
#ifdef IPV6_RECVDSTADDR
if ((cmsghdr->cmsg_level == IPPROTO_IPV6) && (cmsg->cmsg_type == IPV6_RECVDSTADDR)) {
if ((cmsghdr->cmsg_level == IPPROTO_IPV6) && (cmsghdr->cmsg_type == IPV6_RECVDSTADDR)) {
struct in6_addr *ia = (struct in6_addr *)CMSG_DATA(cmsghdr);
memcpy(&msg->recv_addr.addr.ipi6_addr, ia, sizeof(msg->recv_addr.addr.ipi6_addr));
msg->recv_addr.family = AF_INET6;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment