All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net/virtio-user: fix O_CLOEXEC undeclared error
@ 2016-06-26 13:49 Jianfeng Tan
  2016-06-28  9:02 ` Yuanhan Liu
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Jianfeng Tan @ 2016-06-26 13:49 UTC (permalink / raw)
  To: dev; +Cc: yuanhan.liu, huawei.xie, Jianfeng Tan

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 <jianfeng.tan@intel.com>
---
 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
 #include <stdint.h>
 #include <stdio.h>
 #include <fcntl.h>
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-07-01  2:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-26 13:49 [PATCH] net/virtio-user: fix O_CLOEXEC undeclared error Jianfeng Tan
2016-06-28  9:02 ` Yuanhan Liu
2016-06-28  9:41 ` Ferruh Yigit
2016-06-29  1:56   ` Yuanhan Liu
2016-06-29  3:23 ` [PATCH v2] net/virtio-user: fix build error in SUSE 11 Jianfeng Tan
2016-07-01  2:10   ` Yuanhan Liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.