From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 169212C08 for ; Tue, 25 Apr 2017 04:18:30 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Apr 2017 19:18:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,247,1488873600"; d="scan'208";a="78425991" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by orsmga002.jf.intel.com with ESMTP; 24 Apr 2017 19:18:25 -0700 Date: Tue, 25 Apr 2017 10:15:03 +0800 From: Yuanhan Liu To: Adrien Mazarguil Cc: dev@dpdk.org, Maxime Coquelin Message-ID: <20170425021503.GD11512@yliu-dev.sh.intel.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH 05/13] vhost: fix errors with strict compilation flags X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Apr 2017 02:18:31 -0000 On Mon, Apr 24, 2017 at 05:52:59PM +0200, Adrien Mazarguil wrote: > 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: eb32247457fe ("vhost: export guest memory regions") > Fixes: a798beb47c8e ("vhost: rename header file") > > Cc: Yuanhan Liu > Cc: Maxime Coquelin > Signed-off-by: Adrien Mazarguil Acked-by: Yuanhan Liu --yliu