From: Michael Qiu <michael.qiu@intel.com>
To: dev@dpdk.org
Subject: [PATCH] examples/netmap_compat: Fix compile issue with POLLRDNORM
Date: Fri, 11 Dec 2015 14:36:33 +0800 [thread overview]
Message-ID: <1449815793-12138-1-git-send-email-michael.qiu@intel.com> (raw)
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
next reply other threads:[~2015-12-11 6:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-11 6:36 Michael Qiu [this message]
2015-12-12 20:56 ` [PATCH] examples/netmap_compat: Fix compile issue with POLLRDNORM Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1449815793-12138-1-git-send-email-michael.qiu@intel.com \
--to=michael.qiu@intel.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).