From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Qiu Subject: [PATCH] examples/netmap_compat: Fix compile issue with POLLRDNORM Date: Fri, 11 Dec 2015 14:36:33 +0800 Message-ID: <1449815793-12138-1-git-send-email-michael.qiu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable To: dev@dpdk.org Return-path: 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) 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: =E2=80=98POLLRDNORM=E2=80=99 undeclared (first use in this functi= on) 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; }; =20 +#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) =20 --=20 1.9.3