MINOR: fd: add a new flag HAP_POLL_F_RDHUP to struct poller

We'll need to differenciate between pollers which can report hangup at
the same time as read (POLL_RDHUP) from the other ones, because only
these ones may benefit from the fd_done_recv() optimization. Epoll has
had support for EPOLLRDHUP since Linux 2.6.17 and has always been used
this way in haproxy, so now we only set the flag once we've observed it
once in a response. It means that some initial requests may try to
perform a second recv() call, but after the first closed connection it
will be enough to know that the second call is not needed anymore.

Later we may extend these flags to designate event-triggered pollers.
diff --git a/include/types/fd.h b/include/types/fd.h
index 7f63093..2bd7c07 100644
--- a/include/types/fd.h
+++ b/include/types/fd.h
@@ -120,7 +120,11 @@
  *    the term() function.
  *  - clo() should be used to do indicate the poller that fd will be closed.
  *  - poll() calls the poller, expiring at <exp>
+ *  - flags indicate what the poller supports (HAP_POLL_F_*)
  */
+
+#define HAP_POLL_F_RDHUP 0x00000001                          /* the poller notifies of HUP with reads */
+
 struct poller {
 	void   *private;                                     /* any private data for the poller */
 	void REGPRM1   (*clo)(const int fd);                 /* mark <fd> as closed */
@@ -130,6 +134,7 @@
 	int  REGPRM1   (*test)(struct poller *p);            /* pre-init check of the poller */
 	int  REGPRM1   (*fork)(struct poller *p);            /* post-fork re-opening */
 	const char   *name;                                  /* poller name */
+	unsigned int flags;                                  /* HAP_POLL_F_* */
 	int    pref;                                         /* try pollers with higher preference first */
 };