numam-dpdk/devtools
Adrien Mazarguil f8904d5636 vhost: fix header for strict compilation flags
Exported headers must allow compilation with the strictest flags. This
commit addresses the following errors:

 In file included from /tmp/check-includes.sh.20132.c:1:0:
 build/include/rte_vhost.h:73:30: error: ISO C forbids zero-size array
    'regions' [-Werror=pedantic]
 [...]

Also:

- Add C++ awareness to rte_vhost.h for consistency with rte_eth_vhost.h.
- Move Linux includes into C++ block to prevent linking issues with
  exported symbols.
- Update check-includes.sh following the removal of rte_virtio_net.h.

Finally, update check-includes.sh to ignore rte_vhost.h and rte_eth_vhost.h
from now on since the Linux headers they depend on are not clean enough:

 In file included from /usr/include/linux/vhost.h:17:0,
                  from build/include/rte_vhost.h:43,
                  from build/include/rte_eth_vhost.h:44,
                  from /tmp/check-includes.sh.20132.c:1:
 /usr/include/linux/virtio_ring.h: In function 'vring_init':
 /usr/include/linux/virtio_ring.h:146:16: error: pointer of type 'void *'
    used in arithmetic [-Werror=pointer-arith]
 [...]
 In file included from build/include/rte_vhost.h:43:0,
                  from build/include/rte_eth_vhost.h:44,
                  from /tmp/check-includes.sh.20132.c:1:
 /usr/include/linux/vhost.h: At top level:
 /usr/include/linux/vhost.h:73:3: error: ISO C99 doesn't support unnamed
    structs/unions [-Werror=pedantic]
 [...]

Fixes: eb32247457 ("vhost: export guest memory regions")
Fixes: a798beb47c ("vhost: rename header file")

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2017-05-01 00:13:15 +02:00
..
cocci
build-tags.sh devtools: add tags and cscope index generation 2017-04-30 12:57:04 +02:00
check-git-log.sh devtools: add git log checks for acronyms 2017-04-25 11:58:07 +02:00
check-includes.sh vhost: fix header for strict compilation flags 2017-05-01 00:13:15 +02:00
check-maintainers.sh
checkpatches.sh devtools: ignore warning on long log string 2017-03-06 16:00:35 +01:00
cocci.sh
git-log-fixes.sh devtools: list stable commits without fixline 2017-04-28 12:05:03 +02:00
load-devel-config
test-build.sh devtools: add test apps to build script 2017-04-06 21:44:06 +02:00
test-null.sh
validate-abi.sh