[dpdk-dev] [PATCH] net/virtio-user: fix O_CLOEXEC undeclared error

Yuanhan Liu yuanhan.liu at linux.intel.com
Tue Jun 28 11:02:54 CEST 2016


On Sun, Jun 26, 2016 at 01:49:46PM +0000, 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.

I think you need give a reason how that error comes and why this
would fix the error.

And if you look at the git history, you might want to define this
macro in Makefile. See commit e49680a87e06 ("mk: compilation fixes").

Last, don't forgot to run ./scripts/check-git-log.sh against your patch.

	--yliu


More information about the dev mailing list