CONTRIB: debug: address "poll" utility build on non-linux platforms
authorWilly Tarreau <w@1wt.eu>
Mon, 21 Dec 2020 07:43:50 +0000 (08:43 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 8 Jan 2021 10:37:59 +0000 (11:37 +0100)
MSG_NOSIGNAL and MSG_MORE are not defined everywhere, let's make them
zero when not defined. It will roughly result in the same behavior,
albeit a bit less optimal, which is no big deal when debugging. This
should fix issue #1014.

(cherry picked from commit 79d2e7bbbd56455f5f73c030df41e8e1ed621df4)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 361e90eb459f9e9418c93c3cc2da5d6bc02c159d)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 2e8e6b1a53124265fe186730ed5cd0109c7a04de)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>

contrib/debug/poll.c

index b535c07..55f922a 100644 (file)
 #define POLLRDHUP 0
 #endif
 
+#ifndef MSG_NOSIGNAL
+#define MSG_NOSIGNAL 0
+#endif
+#ifndef MSG_MORE
+#define MSG_MORE 0
+#endif
+
 int verbose = 0;
 int cmd = 0;
 int cmdstep = 0;