From e0b10245025f5661e03fdedb0c7053a616359158 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Fri, 5 Apr 2013 17:44:11 +0200 Subject: [PATCH] backport a define for SOCK_SELECT_ERR_QUEUE This is a bit tricky, but it works because adding 14 to SOCK_QUEUE_SHRUNK will always reach a bit that can't be set on older kernels anyway. Signed-off-by: Johannes Berg --- backport/include/linux/compat-3.10.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/backport/include/linux/compat-3.10.h b/backport/include/linux/compat-3.10.h index 2ecb249d39d6..c4f279b071c1 100644 --- a/backport/include/linux/compat-3.10.h +++ b/backport/include/linux/compat-3.10.h @@ -97,6 +97,15 @@ static inline void *PDE_DATA(const struct inode *inode) return PROC_I(inode)->pde->data; } +/* + * backport SOCK_SELECT_ERR_QUEUE -- see commit + * "net: add option to enable error queue packets waking select" + * + * Adding 14 to SOCK_QUEUE_SHRUNK will reach a bet that can't be + * set on older kernels, so sock_flag() will always return false. + */ +#define SOCK_SELECT_ERR_QUEUE (SOCK_QUEUE_SHRUNK + 14) + #else /* kernel is >= 3.10 */ /* * We'd delete this upstream ever got this, we use our -- 2.30.2