Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix linker error when compiling SAI RPC server. #1093

Merged
merged 5 commits into from
Jun 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/saithrift/src/saiserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ sai_switch_api_t* sai_switch_api;
std::map<std::string, std::string> gProfileMap;
std::map<std::set<int>, std::string> gPortMap;

std::vector<std::pair<sai_fdb_entry_t, sai_object_id_t>>gFdbMap;
extern std::vector<std::pair<sai_fdb_entry_t, sai_object_id_t>> gFdbMap;

sai_object_id_t gSwitchId; ///< SAI switch global object ID.

Expand Down
4 changes: 2 additions & 2 deletions test/saithrift/src/switch_sai_rpc_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ extern sai_object_id_t gSwitchId;

typedef std::vector<sai_thrift_attribute_t> std_sai_thrift_attr_vctr_t;

std::vector<std::pair<sai_fdb_entry_t, sai_object_id_t>>gFdbMap;

class switch_sai_rpcHandler : virtual public switch_sai_rpcIf {
public:
switch_sai_rpcHandler() noexcept
Expand Down Expand Up @@ -767,8 +769,6 @@ class switch_sai_rpcHandler : virtual public switch_sai_rpcIf {
sai_object_id_t bport_id;
sai_fdb_entry_t fdb_entry;

extern std::vector<std::pair<sai_fdb_entry_t, sai_object_id_t>> gFdbMap;

thrift_attr_list.attr_count = gFdbMap.size();

sai_fdb_entry_t fdb_m;
Expand Down