Skip to content

Commit 4530b77

Browse files
committed
debug.h: Avoid cyclic include dependency
The "lwip/opt.h" header file includes "lwip/debug.h". Do not include "lwip/opt.h" in "lwip/debug.h". Produce an error if "lwip/debug.h" is included before "lwip/opt.h".
1 parent 56b29f8 commit 4530b77

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/include/lwip/debug.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@
3838
#define LWIP_HDR_DEBUG_H
3939

4040
#include "lwip/arch.h"
41-
#include "lwip/opt.h"
41+
42+
#ifndef LWIP_HDR_OPT_H
43+
#error "lwip/opt.h must be included before this header file"
44+
#endif
4245

4346
/**
4447
* @defgroup debugging_levels LWIP_DBG_MIN_LEVEL and LWIP_DBG_TYPES_ON values

0 commit comments

Comments
 (0)