From: Michael Qiu Date: Fri, 11 Dec 2015 06:36:33 +0000 (+0800) Subject: examples/netmap_compat: fix build on Suse 11 X-Git-Tag: spdx-start~7785 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=248f9319f7b49540392b193cbf0c79f74d1afe0e;p=dpdk.git examples/netmap_compat: fix build on Suse 11 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". In suse11 sp3, POLLRDNORM will not be defined because "__USE_XOPEN" issue. This patch add check if it is not defined, define it. Fixes: 06371afe394d (examples/netmap_compat: import netmap compatibility example) Signed-off-by: Michael Qiu --- diff --git a/examples/netmap_compat/lib/compat_netmap.c b/examples/netmap_compat/lib/compat_netmap.c index d2e079f997..dd6d4f9189 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)