kou commented on PR #50001:
URL: https://github.com/apache/arrow/pull/50001#issuecomment-4498202705

   How about this?
   
   ```diff
   diff --git a/cpp/src/arrow/flight/transport/grpc/util_internal.h 
b/cpp/src/arrow/flight/transport/grpc/util_internal.h
   index 6ff3dadb53..7e306d574a 100644
   --- a/cpp/src/arrow/flight/transport/grpc/util_internal.h
   +++ b/cpp/src/arrow/flight/transport/grpc/util_internal.h
   @@ -17,18 +17,23 @@
    
    #pragma once
    
   -#include <grpcpp/version_info.h>
   +#include <grpcpp/grpcpp.h>
    
    #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)))))
   +// gRPC 1.51.0 or later defines GRPC_CPP_VERSION_MAJOR and so on.
   +#ifdef GRPC_CPP_VERSION_MAJOR
   +#  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)))))
   +#else
   +#  define GRPC_CPP_VERSION_CHECK(major, minor, patch) 0
   +#endif
    
    #if GRPC_CPP_VERSION_CHECK(1, 80, 0)
    #  include <absl/status/status.h>
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to