Skip to content

Commit dc64165

Browse files
authored
Merge pull request #11597 from mirelachirica/errno_include_macosx
Missing errno.h include
2 parents f30f763 + 0860f3e commit dc64165

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

features/cellular/framework/AT/ATHandler.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <ctype.h>
1919
#include <stdio.h>
2020
#include <limits.h>
21+
#include <errno.h>
2122
#include "ATHandler.h"
2223
#include "mbed_poll.h"
2324
#include "FileHandle.h"
@@ -748,8 +749,7 @@ int32_t ATHandler::read_int()
748749
}
749750

750751
errno = 0;
751-
char *endptr;
752-
long result = std::strtol(buff, &endptr, 10);
752+
long result = std::strtol(buff, NULL, 10);
753753
if ((result == LONG_MIN || result == LONG_MAX) && errno == ERANGE) {
754754
return -1; // overflow/underflow
755755
}

0 commit comments

Comments
 (0)