diff --git a/src/modules/simulator/simulator_mavlink.cpp b/src/modules/simulator/simulator_mavlink.cpp index 31292a8b6b..4ea56156ac 100644 --- a/src/modules/simulator/simulator_mavlink.cpp +++ b/src/modules/simulator/simulator_mavlink.cpp @@ -359,11 +359,11 @@ void Simulator::send() int rv; // set the threads name - #ifdef __PX4_DARWIN +#ifdef __PX4_DARWIN rv = pthread_setname_np("sim_send"); - #else +#else rv = pthread_setname_np(pthread_self(), "sim_send"); - #endif +#endif int pret; @@ -524,11 +524,11 @@ void Simulator::pollForMAVLinkMessages(bool publish) int rv; // set the threads name - #ifdef __PX4_DARWIN +#ifdef __PX4_DARWIN rv = pthread_setname_np("sim_rcv"); - #else +#else rv = pthread_setname_np(pthread_self(), "sim_rcv"); - #endif +#endif // wait for new mavlink messages to arrive while (true) {