From patchwork Fri Dec 11 06:36:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Qiu X-Patchwork-Id: 9476 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id DAF398E72; Fri, 11 Dec 2015 07:36:44 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 875738E71 for ; Fri, 11 Dec 2015 07:36:43 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP; 10 Dec 2015 22:36:42 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,412,1444719600"; d="scan'208";a="858618203" Received: from shilc102.sh.intel.com ([10.239.39.44]) by fmsmga001.fm.intel.com with ESMTP; 10 Dec 2015 22:36:41 -0800 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shilc102.sh.intel.com with ESMTP id tBB6acCo031357; Fri, 11 Dec 2015 14:36:38 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id tBB6aYI7012172; Fri, 11 Dec 2015 14:36:36 +0800 Received: (from dayuqiu@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id tBB6aYwT012168; Fri, 11 Dec 2015 14:36:34 +0800 From: Michael Qiu To: dev@dpdk.org Date: Fri, 11 Dec 2015 14:36:33 +0800 Message-Id: <1449815793-12138-1-git-send-email-michael.qiu@intel.com> X-Mailer: git-send-email 1.7.4.1 MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH] examples/netmap_compat: Fix compile issue with POLLRDNORM 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" examples/netmap_compat/bridge/../lib/compat_netmap.c:880:41: error: ‘POLLRDNORM’ undeclared (first use in this function) The root casue is POLLRDNORM is more-or-less nonstandard, and it depends on macro "__USE_XOPEN". Fixes: 06371afe394d (examples/netmap_compat: import netmap compatibility example) In suse11 sp3, POLLRDNORM will not be defined because "__USE_XOPEN" issue. This patch add check if it is not defined, define it. Signed-off-by: Michael Qiu --- examples/netmap_compat/lib/compat_netmap.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/examples/netmap_compat/lib/compat_netmap.c b/examples/netmap_compat/lib/compat_netmap.c index d2e079f..dd6d4f9 100644 --- a/examples/netmap_compat/lib/compat_netmap.c +++ b/examples/netmap_compat/lib/compat_netmap.c @@ -73,6 +73,14 @@ struct fd_port { uint32_t port; }; +#ifndef POLLRDNORM +#define POLLRDNORM 0x0040 +#endif + +#ifndef POLLWRNORM +#define POLLWRNORM 0x0100 +#endif + #define FD_PORT_FREE UINT32_MAX #define FD_PORT_RSRV (FD_PORT_FREE - 1)