Skip to content

Commit 1b1ede4

Browse files
committed
fix(mosq): include config.h before any system header
1 parent c6f08ee commit 1b1ede4

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

components/mosquitto/port/files.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
*
44
* SPDX-License-Identifier: EPL-2.0
55
*
6-
* SPDX-FileContributor: 2024 Espressif Systems (Shanghai) CO LTD
6+
* SPDX-FileContributor: 2024-2025 Espressif Systems (Shanghai) CO LTD
77
*/
8-
#include <ctype.h>
9-
#include "mosquitto.h"
108
#include "mosquitto_broker_internal.h"
9+
#include "mosquitto.h"
10+
#include <ctype.h>
1111

1212
// Dummy implementation of file access
1313
// This needs to be implemented if we need to load/store config from files
Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
11
/*
2-
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66
#pragma once
7+
#include_next "config.h"
8+
9+
/*
10+
* =======================================================================
11+
* Do NOT include any other header before this comment.
12+
* config.h header configures critical macros that must be set before any
13+
* system or standard library headers are included.
14+
* =======================================================================
15+
*/
16+
717
#include <ctype.h>
818
#include "net/if.h"
919

1020
#undef isspace
1121
#define isspace(__c) (__ctype_lookup((int)__c)&_S)
1222

13-
#include_next "config.h"
14-
1523
#define VERSION "v2.0.20~2"

0 commit comments

Comments
 (0)