Merge pull request #3772 from tpglitch/fix/mingw-comp
fix(build): use GNU printf checker on MinGW
This commit is contained in:
2 files changed
+3
-3
No files matched your search
@@ -226,7 +226,7 @@ serial_port uart_open(const char *pcPortName, uint32_t speed, bool slient) {
|
||||
|
||||
int s = getaddrinfo(addrStr, portStr, &info, &addr);
|
||||
if (s != 0) {
|
||||
PrintAndLogEx(ERR, "error: getaddrinfo: %d: %s", s, gai_strerror(s));
|
||||
PrintAndLogEx(ERR, "error: getaddrinfo: %d: %s", s, gai_strerrorA(s));
|
||||
freeaddrinfo(addr);
|
||||
free(addrPortStr);
|
||||
free(sp);
|
||||
|
||||
+2
-2
@@ -31,8 +31,8 @@ extern "C" {
|
||||
#define _USE_MATH_DEFINES
|
||||
|
||||
// mingw: match GNU printf enabled via _ISOC99_SOURCE, not ms_printf
|
||||
#ifdef __MINGW_PRINTF_FORMAT
|
||||
#define PM3_PRINTF_FORMAT __MINGW_PRINTF_FORMAT
|
||||
#ifdef __MINGW32__
|
||||
#define PM3_PRINTF_FORMAT gnu_printf
|
||||
#else
|
||||
#define PM3_PRINTF_FORMAT printf
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user