p4lang / behavioral-model

The reference P4 software switch
Apache License 2.0
538 stars 328 forks source link

base_test: fix typedef-name after 'class' error #1182

Closed rst0git closed 1 year ago

rst0git commented 1 year ago

This pull request fixes the following error, which appears when building BMv2 on Ubuntu 22.04:

In file included from base_test.cpp:28:
base_test.h:35:7: error: using typedef-name 'grpc::Channel' after 'class'
   35 | class Channel;
      |       ^~~~~~~
In file included from /usr/include/grpcpp/grpcpp.h:52,
                 from base_test.cpp:21:
/usr/include/grpcpp/channel.h:26:30: note: 'grpc::Channel' has a previous declaration here
   26 | typedef ::grpc_impl::Channel Channel;
      |                              ^~~~~~~

This error appears because a typedef Channel has been introduced in newer versions of gRPC.