diff --git a/cpp/src/arrow/flight/transport/grpc/util_internal.h b/cpp/src/arrow/flight/transport/grpc/util_internal.h index 6f3d86eb6535..6ff3dadb53cc 100644 --- a/cpp/src/arrow/flight/transport/grpc/util_internal.h +++ b/cpp/src/arrow/flight/transport/grpc/util_internal.h @@ -17,11 +17,23 @@ #pragma once +#include + #include "arrow/flight/transport/grpc/protocol_grpc_internal.h" #include "arrow/flight/types.h" #include "arrow/flight/visibility.h" #include "arrow/util/macros.h" +#define GRPC_CPP_VERSION_CHECK(major, minor, patch) \ + ((GRPC_CPP_VERSION_MAJOR > (major) || \ + (GRPC_CPP_VERSION_MAJOR == (major) && GRPC_CPP_VERSION_MINOR > (minor)) || \ + ((GRPC_CPP_VERSION_MAJOR == (major) && GRPC_CPP_VERSION_MINOR == (minor) && \ + GRPC_CPP_VERSION_PATCH >= (patch))))) + +#if GRPC_CPP_VERSION_CHECK(1, 80, 0) +# include +#endif + namespace grpc { class Status; @@ -34,12 +46,6 @@ class Status; namespace flight { -#define GRPC_CPP_VERSION_CHECK(major, minor, patch) \ - ((GRPC_CPP_VERSION_MAJOR > (major) || \ - (GRPC_CPP_VERSION_MAJOR == (major) && GRPC_CPP_VERSION_MINOR > (minor)) || \ - ((GRPC_CPP_VERSION_MAJOR == (major) && GRPC_CPP_VERSION_MINOR == (minor) && \ - GRPC_CPP_VERSION_PATCH >= (patch))))) - #define GRPC_RETURN_NOT_OK(expr) \ do { \ ::arrow::Status _s = (expr); \