Skip to content

Commit b1f1050

Browse files
committed
Fix compiling erros on ROS2 < rolling
1 parent fe3e866 commit b1f1050

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/rcl_graph_bindings.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,12 @@ typedef rcl_ret_t (*rcl_get_info_by_topic_func_t)(
3333
const char* topic_name, bool no_mangle,
3434
rcl_topic_endpoint_info_array_t* info_array);
3535

36+
#if ROS_VERSION > 2405
3637
typedef rcl_ret_t (*rcl_get_info_by_service_func_t)(
3738
const rcl_node_t* node, rcutils_allocator_t* allocator,
3839
const char* service_name, bool no_mangle,
3940
rcl_service_endpoint_info_array_t* info_array);
41+
#endif
4042

4143
Napi::Value GetPublisherNamesAndTypesByNode(const Napi::CallbackInfo& info) {
4244
Napi::Env env = info.Env();
@@ -262,6 +264,7 @@ Napi::Value GetSubscriptionsInfoByTopic(const Napi::CallbackInfo& info) {
262264
"subscriptions", rcl_get_subscriptions_info_by_topic);
263265
}
264266

267+
#if ROS_VERSION > 2405
265268
Napi::Value GetInfoByService(
266269
Napi::Env env, rcl_node_t* node, const char* service_name, bool no_mangle,
267270
const char* type, rcl_get_info_by_service_func_t rcl_get_info_by_service) {
@@ -297,6 +300,7 @@ Napi::Value GetInfoByService(
297300

298301
return ConvertToJSServiceEndpointInfoList(env, &info_array);
299302
}
303+
#endif
300304

301305
#if ROS_VERSION > 2405
302306
Napi::Value GetClientsInfoByService(const Napi::CallbackInfo& info) {

0 commit comments

Comments
 (0)