mirror of
https://github.com/espressif/esp-mqtt.git
synced 2026-10-17 13:17:41 +00:00
fix(mqtt_utils): Include stdint.h for intptr_t
mqtt_create_uri_from_string uses intptr_t but includes only string.h,
ctype.h and stdlib.h. It builds today because one of those reaches
stdint.h transitively on the toolchains in use; GCC 16 no longer does,
and the file stops compiling:
mqtt_utils.c:36:10: error: unknown type name 'intptr_t'
36 | for (intptr_t i = 0; i < uri_len; i++, write_ptr++) {
| ^~~~~~~~
Include the header the type comes from rather than rely on another one
to bring it in.
Signed-off-by: Nebojša Cvetković <[email protected]>
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
*/
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include "include/mqtt_utils.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user