diff options
author | Yash Tibrewal <yashkt@google.com> | 2018-08-21 17:07:33 -0700 |
---|---|---|
committer | Yash Tibrewal <yashkt@google.com> | 2018-08-21 17:07:33 -0700 |
commit | ecee4ac703e909b4edd789e137e3b0b736dfe37a (patch) | |
tree | 436c1ba74da989857cca3e5e05099e5b9a4c18d4 /src/core/lib/iomgr/port.h | |
parent | 2f8e60a7737293a3e44f555ac9de92267785e91f (diff) |
Use linux kernel version 2.6.37 to decide whether to use TCP_USER_TIMEOUT or not
Diffstat (limited to 'src/core/lib/iomgr/port.h')
-rw-r--r-- | src/core/lib/iomgr/port.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/lib/iomgr/port.h b/src/core/lib/iomgr/port.h index 066417b93c..bc58ed13c0 100644 --- a/src/core/lib/iomgr/port.h +++ b/src/core/lib/iomgr/port.h @@ -77,6 +77,12 @@ #define GRPC_LINUX_SOCKETUTILS 1 #endif #endif +#include <linux/version.h> +#ifdef LINUX_VERSION_CODE +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) +#define GRPC_HAVE_TCP_USER_TIMEOUT +#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) */ +#endif /* LINUX_VERSION_CODE */ #ifndef __GLIBC__ #define GRPC_LINUX_EPOLL 1 #define GRPC_LINUX_EPOLL_CREATE1 1 |