diff options
Diffstat (limited to 'src/protocol/ArgParser.cxx')
-rw-r--r-- | src/protocol/ArgParser.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/protocol/ArgParser.cxx b/src/protocol/ArgParser.cxx index 185c57863..2665270e6 100644 --- a/src/protocol/ArgParser.cxx +++ b/src/protocol/ArgParser.cxx @@ -151,7 +151,12 @@ float ParseCommandArgFloat(const char *s) { char *endptr; +#ifdef ANDROID + /* strtof() requires API level 21 */ + auto value = strtod(s, &endptr); +#else auto value = strtof(s, &endptr); +#endif if (endptr == s || *endptr != 0) throw FormatProtocolError(ACK_ERROR_ARG, "Float expected: %s", s); |