]> git.proxmox.com Git - mirror_ovs.git/commit
compiler: Fix compilation when using VStudio 2015/2017
authorAlin Gabriel Serdean <aserdean@ovn.org>
Wed, 3 Apr 2019 12:01:55 +0000 (15:01 +0300)
committerAlin Gabriel Serdean <aserdean@ovn.org>
Tue, 16 Apr 2019 08:47:14 +0000 (11:47 +0300)
commit404df03714f5e8cca88cd18ca7074115e0a2a8ab
tree423eb24c6162f8c582ef16b0fdb10e5b402feba5
parent50aa6e687f16132c102abedc9d014bce364f49e4
compiler: Fix compilation when using VStudio 2015/2017

This is somewhat a regression of:
https://github.com/openvswitch/ovs/commit/27f141d44d95b4cabfd7eac47ace8d1201668b2c

The main issue using `offsetof` from <stddef.h> via the C compiler from
MSVC 2015/2017 has issues and is buggy:
https://bit.ly/2UvWwti

Until it is fixed, we define our own definition of `offsetof`.

Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
Acked-by: Anand Kumar <kumaranand@vmware.com>
include/openvswitch/compiler.h