diff options
-rw-r--r-- | src/examples/publisher/publisher_main.cpp | 5 | ||||
-rw-r--r-- | src/examples/subscriber/subscriber_example.h | 2 | ||||
-rw-r--r-- | src/examples/subscriber/subscriber_main.cpp | 5 |
3 files changed, 8 insertions, 4 deletions
diff --git a/src/examples/publisher/publisher_main.cpp b/src/examples/publisher/publisher_main.cpp index 5b50ecc6c..5cac42250 100644 --- a/src/examples/publisher/publisher_main.cpp +++ b/src/examples/publisher/publisher_main.cpp @@ -52,7 +52,8 @@ using namespace px4; PX4_MAIN_FUNCTION(publisher); #if !defined(__linux) && !(defined(__APPLE__) && defined(__MACH__)) -extern "C" __EXPORT int publisher_main(int argc, char *argv[]) +extern "C" __EXPORT int publisher_main(int argc, char *argv[]); +int publisher_main(int argc, char *argv[]) { if (argc < 1) { errx(1, "usage: publisher {start|stop|status}"); @@ -73,7 +74,7 @@ extern "C" __EXPORT int publisher_main(int argc, char *argv[]) SCHED_PRIORITY_MAX - 5, 2000, publisher_task_main, - (argv) ? (const char **)&argv[2] : (const char **)NULL); + (argv) ? (char* const*)&argv[2] : (char* const*)NULL); exit(0); } diff --git a/src/examples/subscriber/subscriber_example.h b/src/examples/subscriber/subscriber_example.h index c4b853d4d..eb2c956e0 100644 --- a/src/examples/subscriber/subscriber_example.h +++ b/src/examples/subscriber/subscriber_example.h @@ -41,6 +41,8 @@ using namespace px4; +void rc_channels_callback_function(const PX4_TOPIC_T(rc_channels) &msg); + class SubscriberExample { public: SubscriberExample(); diff --git a/src/examples/subscriber/subscriber_main.cpp b/src/examples/subscriber/subscriber_main.cpp index 716233739..c824e34e3 100644 --- a/src/examples/subscriber/subscriber_main.cpp +++ b/src/examples/subscriber/subscriber_main.cpp @@ -52,7 +52,8 @@ using namespace px4; PX4_MAIN_FUNCTION(subscriber); #if !defined(__linux) && !(defined(__APPLE__) && defined(__MACH__)) -extern "C" __EXPORT int subscriber_main(int argc, char *argv[]) +extern "C" __EXPORT int subscriber_main(int argc, char *argv[]); +int subscriber_main(int argc, char *argv[]) { if (argc < 1) { errx(1, "usage: subscriber {start|stop|status}"); @@ -73,7 +74,7 @@ extern "C" __EXPORT int subscriber_main(int argc, char *argv[]) SCHED_PRIORITY_MAX - 5, 2000, subscriber_task_main, - (argv) ? (const char **)&argv[2] : (const char **)NULL); + (argv) ? (char* const*)&argv[2] : (char* const*)NULL); exit(0); } |