i2c_spi_buses:Track NuttX change to getopts avoid name collision

NuttX #defined optarg and getopt to move to TLS. This fixes the
  name collision.
This commit is contained in:
David Sidrane
2021-06-16 17:07:47 +02:00
committed by Julian Oes
parent 64db89ab20
commit 84dd8839a2
55 changed files with 245 additions and 214 deletions
+4 -4
View File
@@ -1,6 +1,6 @@
/****************************************************************************
*
* Copyright (C) 2020 PX4 Development Team. All rights reserved.
* Copyright (C) 2020, 2021 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -182,11 +182,11 @@ extern "C" int ads1115_main(int argc, char *argv[])
cli.default_i2c_frequency = 400000;
cli.i2c_address = 0x48;
while ((ch = cli.getopt(argc, argv, "")) != EOF) {
while ((ch = cli.getOpt(argc, argv, "")) != EOF) {
}
const char *verb = cli.optarg();
const char *verb = cli.optArg();
if (!verb) {
ThisDriver::print_usage();
@@ -209,4 +209,4 @@ extern "C" int ads1115_main(int argc, char *argv[])
ThisDriver::print_usage();
return -1;
}
}