* [dpdk-dev] [PATCH] examples/netmap_compat: Fix compile issue with POLLRDNORM
@ 2015-12-11 6:36 Michael Qiu
2015-12-12 20:56 ` Thomas Monjalon
0 siblings, 1 reply; 2+ messages in thread
From: Michael Qiu @ 2015-12-11 6:36 UTC (permalink / raw)
To: 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 <michael.qiu@intel.com>
---
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)
--
1.9.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [PATCH] examples/netmap_compat: Fix compile issue with POLLRDNORM
2015-12-11 6:36 [dpdk-dev] [PATCH] examples/netmap_compat: Fix compile issue with POLLRDNORM Michael Qiu
@ 2015-12-12 20:56 ` Thomas Monjalon
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2015-12-12 20:56 UTC (permalink / raw)
To: Michael Qiu; +Cc: dev
2015-12-11 14:36, Michael Qiu:
> 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 <michael.qiu@intel.com>
Applied, thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-12-12 20:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-11 6:36 [dpdk-dev] [PATCH] examples/netmap_compat: Fix compile issue with POLLRDNORM Michael Qiu
2015-12-12 20:56 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).