diff --git a/include/mqtt_pal.h b/include/mqtt_pal.h index 6d4e94b..85c32cd 100644 --- a/include/mqtt_pal.h +++ b/include/mqtt_pal.h @@ -69,7 +69,7 @@ extern "C" { /* UNIX-like platform support */ -#if defined(__unix__) || defined(__APPLE__) +#if defined(__unix__) || defined(__APPLE__) || defined(__NuttX__) #include #include #include diff --git a/src/mqtt_pal.c b/src/mqtt_pal.c index 9b9f69f..24a6b86 100644 --- a/src/mqtt_pal.c +++ b/src/mqtt_pal.c @@ -304,7 +304,7 @@ ssize_t mqtt_pal_recvall(mqtt_pal_socket_handle fd, void* buf, size_t bufsz, int return (ssize_t)(bufptr - start); } -#elif defined(__unix__) || defined(__APPLE__) +#elif defined(__unix__) || defined(__APPLE__) || defined(__NuttX__) #include