Bypass ALIGNED_CAST on CMSG_DATA when compiling on MSVC. Ignore the code behind netdev_linux_rxq_drain as well.
Signed-off-by: Alin Gabriel Serdean <[email protected]> --- lib/netdev-linux.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c index 1780639..1b2196f 100644 --- a/lib/netdev-linux.c +++ b/lib/netdev-linux.c @@ -949,7 +949,9 @@ netdev_linux_rxq_recv_sock(int fd, struct ofpbuf *buffer) continue; } +#ifndef _WIN32 aux = ALIGNED_CAST(struct tpacket_auxdata *, CMSG_DATA(cmsg)); +#endif if (auxdata_has_vlan_tci(aux)) { if (retval < ETH_HEADER_LEN) { return EINVAL; @@ -1032,6 +1034,7 @@ netdev_linux_rxq_wait(struct netdev_rxq *rxq_) static int netdev_linux_rxq_drain(struct netdev_rxq *rxq_) { +#ifndef _WIN32 struct netdev_rxq_linux *rx = netdev_rxq_linux_cast(rxq_); if (rx->is_tap) { struct ifreq ifr; @@ -1045,6 +1048,7 @@ netdev_linux_rxq_drain(struct netdev_rxq *rxq_) } else { return drain_rcvbuf(rx->fd); } +#endif } /* Sends 'buffer' on 'netdev'. Returns 0 if successful, otherwise a positive -- 1.9.0.msysgit.0 _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
