From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 04A2B37AA for ; Tue, 28 Jun 2016 11:41:48 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 28 Jun 2016 02:41:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,540,1459839600"; d="scan'208";a="726146163" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.221.47]) ([10.237.221.47]) by FMSMGA003.fm.intel.com with ESMTP; 28 Jun 2016 02:41:24 -0700 To: Jianfeng Tan , dev@dpdk.org References: <1466948986-12255-1-git-send-email-jianfeng.tan@intel.com> Cc: yuanhan.liu@linux.intel.com, huawei.xie@intel.com, Panu Matilainen , Christian Ehrhardt From: Ferruh Yigit Message-ID: <57724644.2070107@intel.com> Date: Tue, 28 Jun 2016 10:41:24 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <1466948986-12255-1-git-send-email-jianfeng.tan@intel.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH] net/virtio-user: fix O_CLOEXEC undeclared error X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jun 2016 09:41:49 -0000 On 6/26/2016 2:49 PM, Jianfeng Tan wrote: > On some older systems, such as SUSE 11, the compiling error shows > as: > .../dpdk/drivers/net/virtio/virtio_user/virtio_user_dev.c:67:22: > error: ‘O_CLOEXEC’ undeclared (first use in this function) > > The fix is to declare _GNU_SOURCE macro before include fcntl.h. > > Fixes: 37a7eb2ae816 ("net/virtio-user: add device emulation layer") > > Signed-off-by: Jianfeng Tan > --- > drivers/net/virtio/virtio_user/virtio_user_dev.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c > index 3d12a32..180f824 100644 > --- a/drivers/net/virtio/virtio_user/virtio_user_dev.c > +++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c > @@ -31,6 +31,7 @@ > * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > */ > > +#define _GNU_SOURCE This flag enables glibc extensions, and kind of problem on code portability. How big problem is it? Is there any platform that DPDK runs on which uses a libc that isn't compatible with what this flag provides? And it seems this flag already used in DPDK, including libraries. If we are agree on using glibc extensions, does it make sense to move this flag into a single common location (like mk/exec-env/) ? > #include > #include > #include >