summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib9p/core.c1
-rw-r--r--lib9p/core_gen/h.py2
-rw-r--r--lib9p/core_include/lib9p/_core_generated.h2
-rw-r--r--lib9p/core_include/lib9p/core.h4
-rw-r--r--libmisc/tests/test_assert.c1
-rw-r--r--libmisc/tests/test_log.c1
6 files changed, 3 insertions, 8 deletions
diff --git a/lib9p/core.c b/lib9p/core.c
index 942db05..d64e23a 100644
--- a/lib9p/core.c
+++ b/lib9p/core.c
@@ -4,7 +4,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <stdarg.h> /* for va_* */
#include <string.h> /* for strlen(), strnlen(), strncpy(), memcmp(), memset() */
#include <libmisc/assert.h> /* for assert() */
diff --git a/lib9p/core_gen/h.py b/lib9p/core_gen/h.py
index c7c832b..8c381f8 100644
--- a/lib9p/core_gen/h.py
+++ b/lib9p/core_gen/h.py
@@ -169,8 +169,6 @@ def gen_h(versions: set[str], typs: list[idl.UserType]) -> str:
ret += """
/* config *********************************************************************/
-
-#include "config.h"
"""
for ver in sorted(versions):
ret += "\n"
diff --git a/lib9p/core_include/lib9p/_core_generated.h b/lib9p/core_include/lib9p/_core_generated.h
index d1ecd6e..de7795a 100644
--- a/lib9p/core_include/lib9p/_core_generated.h
+++ b/lib9p/core_include/lib9p/_core_generated.h
@@ -6,8 +6,6 @@
/* config *********************************************************************/
-#include "config.h"
-
#ifndef CONFIG_9P_ENABLE_9P2000
#error config.h must define CONFIG_9P_ENABLE_9P2000
#endif
diff --git a/lib9p/core_include/lib9p/core.h b/lib9p/core_include/lib9p/core.h
index 69b8d3f..27553a3 100644
--- a/lib9p/core_include/lib9p/core.h
+++ b/lib9p/core_include/lib9p/core.h
@@ -16,7 +16,9 @@
#include <libmisc/fmt.h>
#define CONFIG_9P_ENABLE_uninitialized 1
-#include <lib9p/_core_generated.h>
+#include "config.h"
+
+#include <lib9p/_core_generated.h> /* _after_ other includes, including config.h */
#ifndef CONFIG_9P_MAX_ERR_SIZE
#error config.h must define CONFIG_9P_MAX_ERR_SIZE
diff --git a/libmisc/tests/test_assert.c b/libmisc/tests/test_assert.c
index cdbc567..290b073 100644
--- a/libmisc/tests/test_assert.c
+++ b/libmisc/tests/test_assert.c
@@ -5,7 +5,6 @@
*/
#include <setjmp.h>
-#include <stdarg.h> /* for va_list, va_start(), va_end() */
#include <stdlib.h>
#include <string.h>
diff --git a/libmisc/tests/test_log.c b/libmisc/tests/test_log.c
index ee762e2..6e7cdfd 100644
--- a/libmisc/tests/test_log.c
+++ b/libmisc/tests/test_log.c
@@ -4,7 +4,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <stdarg.h> /* for va_list */
#include <stdio.h> /* for vsnprintf() */
#include <stdlib.h> /* for realloc(), free() */
#include <string.h> /* for strlen(), strcmp() */