summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJianfeng Tan <jianfeng.tan@intel.com>2016-06-29 03:23:03 +0000
committerYuanhan Liu <yuanhan.liu@linux.intel.com>2016-07-04 04:08:41 +0200
commit17450351fff8cc63624c0ab4d46a8f5eec37c802 (patch)
treeb63af59174487528d3c10bde55940991fa55947e /drivers
parent15f472c41e9adaaeecf8d897e3875b85808c1428 (diff)
downloaddpdk-17450351fff8cc63624c0ab4d46a8f5eec37c802.zip
dpdk-17450351fff8cc63624c0ab4d46a8f5eec37c802.tar.gz
dpdk-17450351fff8cc63624c0ab4d46a8f5eec37c802.tar.xz
net/virtio-user: fix build on Suse 11
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 use EFD_CLOEXEC, which is defined in sys/eventfd.h, instead of O_CLOEXEC which needs _GNU_SOURCE defined on some old systems. Fixes: 37a7eb2ae816 ("net/virtio-user: add device emulation layer") Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com> Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/virtio/virtio_user/virtio_user_dev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index 3d12a32..1b1e5bf 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -63,12 +63,12 @@ virtio_user_kick_queue(struct virtio_user_dev *dev, uint32_t queue_sel)
/* May use invalid flag, but some backend leverages kickfd and callfd as
* criteria to judge if dev is alive. so finally we use real event_fd.
*/
- callfd = eventfd(0, O_CLOEXEC | O_NONBLOCK);
+ callfd = eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK);
if (callfd < 0) {
PMD_DRV_LOG(ERR, "callfd error, %s\n", strerror(errno));
return -1;
}
- kickfd = eventfd(0, O_CLOEXEC | O_NONBLOCK);
+ kickfd = eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK);
if (kickfd < 0) {
close(callfd);
PMD_DRV_LOG(ERR, "kickfd error, %s\n", strerror(errno));