Skip to content
Closed
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
1 change: 1 addition & 0 deletions test/saithrift/src/saiserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <unistd.h>
#include <sys/queue.h>
#include <sys/types.h>
#include <algorithm>
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To fix

g++ -I/usr/include/sai -I. -std=c++11 -DFORCE_BOOST_SMART_PTR -c src/saiserver.cpp -o src/obj/saiserver.o -I/usr/include/sai -I. -std=c++11 -DFORCE_BOOST_SMART_PTR -DBRCMSAI -I./src/gen-cpp -I./src
src/saiserver.cpp: In function 'void handlePortMap(const string&)':
src/saiserver.cpp:361:26: error: 'remove_if' is not a member of 'std'
         lanes.erase(std::remove_if(lanes.begin(), lanes.end(), ::isspace), lanes.end());
                          ^~~~~~~~~
src/saiserver.cpp:361:26: note: suggested alternative: 'remove_cv'
         lanes.erase(std::remove_if(lanes.begin(), lanes.end(), ::isspace), lanes.end());
                          ^~~~~~~~~
                          remove_cv
make: *** [Makefile:89: src/obj/saiserver.o] Error 1

#include <fstream>
#include <sstream>
#include <set>
Expand Down
12 changes: 6 additions & 6 deletions test/saithrift/src/switch_sai.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ struct sai_thrift_vlan_port_t {
2: sai_thrift_vlan_tagging_mode_t tagging_mode;
}

union sai_thrift_ip_t {
struct sai_thrift_ip_t {
1: sai_thrift_ip4_t ip4;
2: sai_thrift_ip6_t ip6;
}
Expand Down Expand Up @@ -79,7 +79,7 @@ struct sai_thrift_s32_list_t {
2: list<i32> s32list;
}

union sai_thrift_acl_mask_t {
struct sai_thrift_acl_mask_t {
1: byte u8;
2: byte s8;
3: i16 u16;
Expand All @@ -91,7 +91,7 @@ union sai_thrift_acl_mask_t {
9: sai_thrift_ip6_t ip6;
}

union sai_thrift_acl_data_t {
struct sai_thrift_acl_data_t {
1: byte u8;
2: byte s8;
3: i16 u16;
Expand All @@ -112,7 +112,7 @@ struct sai_thrift_acl_field_data_t
3: sai_thrift_acl_data_t data;
}

union sai_thrift_acl_parameter_t {
struct sai_thrift_acl_parameter_t {
1: byte u8;
2: byte s8;
3: i16 u16;
Expand Down Expand Up @@ -161,7 +161,7 @@ struct sai_thrift_fdb_values_t {
2: sai_thrift_fdb_entry_t thrift_fdb_entry;
}

union sai_thrift_attribute_value_t {
struct sai_thrift_attribute_value_t {
1: bool booldata;
2: string chardata;
3: byte u8;
Expand Down Expand Up @@ -207,7 +207,7 @@ struct sai_thrift_attribute_list_t {
2: i32 attr_count; // redundant
}

union sai_thrift_result_data_t {
struct sai_thrift_result_data_t {
1: sai_thrift_object_list_t objlist;
2: sai_thrift_object_id_t oid;
3: i16 u16;
Expand Down
2 changes: 1 addition & 1 deletion test/saithrift/src/switch_sai_rpc_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ using namespace ::apache::thrift::protocol;
using namespace ::apache::thrift::transport;
using namespace ::apache::thrift::server;

using boost::shared_ptr;
using std::shared_ptr;

using namespace ::switch_sai;

Expand Down