mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 20:53:35 +08:00
NuttX: fixes for NuttX build
In the upstream tree ringbuffer.h includes the method implementations in the header file which causes multiple definitions in the link for other targets. Changed so ringbuffer.cpp is build separately for other platforms and is included by ringbuffer.h on NuttX. uORB changes do not link without uORBTest_UnitTest.cpp enabled for the NuttX build. px4_getopt was not exported and wasn't visible in NuttX build. The makefiles were restored to be as close as possible to upstream so the NuttX build builtin's work again. The code will have to be refactored after the merge. Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
@@ -121,7 +121,7 @@ static int reorder(int argc, char **argv, const char *options)
|
||||
// Argv is changed to put all options and option args at the beginning,
|
||||
// followed by non-options.
|
||||
//
|
||||
int px4_getopt(int argc, char *argv[], const char *options, int *myoptind, const char **myoptarg)
|
||||
__EXPORT int px4_getopt(int argc, char *argv[], const char *options, int *myoptind, const char **myoptarg)
|
||||
{
|
||||
char *p;
|
||||
char c;
|
||||
@@ -149,4 +149,3 @@ int px4_getopt(int argc, char *argv[], const char *options, int *myoptind, const
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user