diff --git a/src/main.c b/src/main.c index 49a855673..49dae75f5 100644 --- a/src/main.c +++ b/src/main.c @@ -1269,11 +1269,11 @@ int main(int argc, char * argv []) break; case CONNTYPE_SPI: - port = mmt_strdup( #ifdef HAVE_LINUXSPI - *default_spi? default_spi: + port = mmt_strdup(*default_spi? default_spi: "unknown"); +#else + port = mmt_strdup("unknown"); #endif - "unknown"); break; case CONNTYPE_LINUXGPIO: diff --git a/src/whereami.c b/src/whereami.c index 8d67b2a88..d8ff67e00 100644 --- a/src/whereami.c +++ b/src/whereami.c @@ -14,6 +14,9 @@ extern "C" { #if !defined(WAI_MALLOC) || !defined(WAI_FREE) || !defined(WAI_REALLOC) #include +#ifndef PATH_MAX +#define PATH_MAX _MAX_PATH +#endif #include "avrdude.h" #include "libavrdude.h" #endif