diff --git a/src/modules/uxrce_dds_client/CMakeLists.txt b/src/modules/uxrce_dds_client/CMakeLists.txt index d29e5035451..210f1935b2c 100644 --- a/src/modules/uxrce_dds_client/CMakeLists.txt +++ b/src/modules/uxrce_dds_client/CMakeLists.txt @@ -75,8 +75,8 @@ else() set(c_flags_with_includes "${c_flags_with_includes} -Wno-cast-align -D__PX4_NUTTX") endif() - # Match UXRCE_DDS_CLIENT_UDP in uxrce_dds_client.h: NuttX targets without networking have no UDP transport - if(PX4_PLATFORM STREQUAL "nuttx" AND NOT CONFIG_NET) + # Match UXRCE_DDS_CLIENT_UDP in uxrce_dds_client.h: NuttX targets without Ethernet have no UDP transport + if(PX4_PLATFORM STREQUAL "nuttx" AND NOT CONFIG_NET_ETHERNET) set(uclient_profile_udp OFF) else() set(uclient_profile_udp ON) diff --git a/src/modules/uxrce_dds_client/uxrce_dds_client.h b/src/modules/uxrce_dds_client/uxrce_dds_client.h index 03b6e5f7c7c..3b85350a7a5 100644 --- a/src/modules/uxrce_dds_client/uxrce_dds_client.h +++ b/src/modules/uxrce_dds_client/uxrce_dds_client.h @@ -47,7 +47,8 @@ #include #include -#if defined(CONFIG_NET) || defined(__PX4_POSIX) +// The NuttX UDP MTU is taken from ETH_UDP_MSS(), which NuttX only defines with Ethernet +#if defined(CONFIG_NET_ETHERNET) || defined(__PX4_POSIX) # define UXRCE_DDS_CLIENT_UDP 1 #endif