Merge pull request #18367 from yashykt/errqueueinit

Use GRPC_LINUX_ERRQUEUE
pull/18393/head
Yash Tibrewal 6 years ago committed by GitHub
commit cbca7b6b00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/core/lib/iomgr/internal_errqueue.cc

@ -38,8 +38,7 @@ bool kernel_supports_errqueue() { return errqueue_supported; }
void grpc_errqueue_init() { void grpc_errqueue_init() {
/* Both-compile time and run-time linux kernel versions should be atleast 4.0.0 /* Both-compile time and run-time linux kernel versions should be atleast 4.0.0
*/ */
#ifdef LINUX_VERSION_CODE #ifdef GRPC_LINUX_ERRQUEUE
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)
struct utsname buffer; struct utsname buffer;
if (uname(&buffer) != 0) { if (uname(&buffer) != 0) {
gpr_log(GPR_ERROR, "uname: %s", strerror(errno)); gpr_log(GPR_ERROR, "uname: %s", strerror(errno));
@ -55,8 +54,7 @@ void grpc_errqueue_init() {
} else { } else {
gpr_log(GPR_DEBUG, "ERRQUEUE support not enabled"); gpr_log(GPR_DEBUG, "ERRQUEUE support not enabled");
} }
#endif /* LINUX_VERSION_CODE <= KERNEL_VERSION(4, 0, 0) */ #endif /* GRPC_LINUX_ERRQUEUE */
#endif /* LINUX_VERSION_CODE */
} }
} /* namespace grpc_core */ } /* namespace grpc_core */

Loading…
Cancel
Save