All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hauke Mehrtens <hauke@hauke-m.de>
To: backports@vger.kernel.org
Cc: johannes@sipsolutions.net, Hauke Mehrtens <hauke@hauke-m.de>
Subject: [PATCH 04/14] backport: poll.h: add include linux/eventpoll.h
Date: Sun,  4 Mar 2018 23:57:07 +0100	[thread overview]
Message-ID: <20180304225717.20890-5-hauke@hauke-m.de> (raw)
In-Reply-To: <20180304225717.20890-1-hauke@hauke-m.de>

The POLL constants are getting replaced with the EPOLL constants. In
this process commit e78cd95bebd9 ("preparation to switching ->poll() to
returning EPOLL...") added an additional include to linux/poll.h. Some
drivers make use of this indirect include now and fail to compile
without it.

Older kernel versions do not define all the EPON constants so add them
if they are not available.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 backport/backport-include/linux/eventpoll.h | 49 +++++++++++++++++++++++++++++
 backport/backport-include/linux/poll.h      |  1 +
 2 files changed, 50 insertions(+)
 create mode 100644 backport/backport-include/linux/eventpoll.h

diff --git a/backport/backport-include/linux/eventpoll.h b/backport/backport-include/linux/eventpoll.h
new file mode 100644
index 00000000..7cc87aa0
--- /dev/null
+++ b/backport/backport-include/linux/eventpoll.h
@@ -0,0 +1,49 @@
+#ifndef __BACKPORT_LINUX_EVENTPOLL_H
+#define __BACKPORT_LINUX_EVENTPOLL_H
+#include_next <linux/eventpoll.h>
+
+#ifndef EPOLLIN
+#define EPOLLIN		0x00000001
+#endif
+
+#ifndef EPOLLPRI
+#define EPOLLPRI	0x00000002
+#endif
+
+#ifndef EPOLLOUT
+#define EPOLLOUT	0x00000004
+#endif
+
+#ifndef EPOLLERR
+#define EPOLLERR	0x00000008
+#endif
+
+#ifndef EPOLLHUP
+#define EPOLLHUP	0x00000010
+#endif
+
+#ifndef EPOLLRDNORM
+#define EPOLLRDNORM	0x00000040
+#endif
+
+#ifndef EPOLLRDBAND
+#define EPOLLRDBAND	0x00000080
+#endif
+
+#ifndef EPOLLWRNORM
+#define EPOLLWRNORM	0x00000100
+#endif
+
+#ifndef EPOLLWRBAND
+#define EPOLLWRBAND	0x00000200
+#endif
+
+#ifndef EPOLLMSG
+#define EPOLLMSG	0x00000400
+#endif
+
+#ifndef EPOLLRDHUP
+#define EPOLLRDHUP	0x00002000
+#endif
+
+#endif /* __BACKPORT_LINUX_EVENTPOLL_H */
diff --git a/backport/backport-include/linux/poll.h b/backport/backport-include/linux/poll.h
index 3eecd81f..aea64048 100644
--- a/backport/backport-include/linux/poll.h
+++ b/backport/backport-include/linux/poll.h
@@ -2,6 +2,7 @@
 #define __BACKPORT_LINUX_POLL_H
 #include_next <linux/poll.h>
 #include <linux/version.h>
+#include <linux/eventpoll.h>
 
 #if  LINUX_VERSION_IS_LESS(3,4,0)
 #define poll_does_not_wait LINUX_BACKPORT(poll_does_not_wait)
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe backports" in

  parent reply	other threads:[~2018-03-04 22:57 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-04 22:57 [PATCH 00/14] backports: multiple fixes and Realtek drivers Hauke Mehrtens
2018-03-04 22:57 ` [PATCH 01/14] patches: refresh on kernel v4.16-rc3 Hauke Mehrtens
2018-03-04 22:57 ` [PATCH 02/14] compat: timer.h: Remove last parameters from DEFINE_TIMER Hauke Mehrtens
2018-03-04 22:57 ` [PATCH 03/14] patches: Use old parameter type for DEFINE_TIMER Hauke Mehrtens
2018-03-21  7:59   ` Johannes Berg
2018-03-04 22:57 ` Hauke Mehrtens [this message]
2018-03-04 22:57 ` [PATCH 05/14] header: types.h: add __poll_t Hauke Mehrtens
2018-03-04 22:57 ` [PATCH 06/14] header: kernel.h: include bug.h Hauke Mehrtens
2018-03-04 22:57 ` [PATCH 07/14] header: debugfs.h: add DEFINE_DEBUGFS_ATTRIBUTE Hauke Mehrtens
2018-03-04 22:57 ` [PATCH 08/14] header: nospec.h: provide dummy header file Hauke Mehrtens
2018-03-04 22:57 ` [PATCH 09/14] header: timekeeping.h: Add ktime_get_real_seconds() Hauke Mehrtens
2018-03-04 22:57 ` [PATCH 10/14] header: timekeeping.h: Add ktime_get_ts64() Hauke Mehrtens
2018-03-04 22:57 ` [PATCH 11/14] header: netdevice.h: Fix netdev_upper_dev_link on 4.14 Hauke Mehrtens
2018-03-04 22:57 ` [PATCH 12/14] header: inet_frag.h: Use old version of in sub_frag_mem_limit() for kernel 3.16 Hauke Mehrtens
2018-03-04 22:57 ` [PATCH 13/14] dependencies: Make mt76 depend on kernel 4.1 Hauke Mehrtens
2018-03-04 22:57 ` [PATCH 14/14] backports: Add staging rtlwifi, rtl8188eu and rtl8723bs driver Hauke Mehrtens
2018-03-21  8:20 ` [PATCH 00/14] backports: multiple fixes and Realtek drivers Johannes Berg

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=20180304225717.20890-5-hauke@hauke-m.de \
    --to=hauke@hauke-m.de \
    --cc=backports@vger.kernel.org \
    --cc=johannes@sipsolutions.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.