From e7a86455ed5eb4d9ca19d2f023b62f08826b9a2f Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Fri, 11 Jul 2025 17:17:43 +0900 Subject: [PATCH 1/2] quota-util: explicitly include linux/quota.h The header linux/quota.h provides e.g. QIF_DQBLKSIZE or PRJQUOTA, which is used where the quota-util.h is included. Let's explicitly include the header with 'IWYU pragma: export' tag. --- src/shared/quota-util.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/shared/quota-util.h b/src/shared/quota-util.h index ec4da0cbb8..2e82b94134 100644 --- a/src/shared/quota-util.h +++ b/src/shared/quota-util.h @@ -1,7 +1,8 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once -#include /* IWYU pragma: export */ +#include /* IWYU pragma: export */ +#include /* IWYU pragma: export */ #include "forward.h" From 0c443a880083bf359c434bbdb948d941118bd42a Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Fri, 11 Jul 2025 17:23:36 +0900 Subject: [PATCH 2/2] tree-wide: include asm/sgidefs.h to make _MIPS_SIM_ABI32 and friends defined The header provides _MIPS_SIM_ABI32 and friends. Glibc indirectly includes the header through sys/syscall.h or unistd.h, but let's explicitly include the header where we use _MIPS_SIM_ABI32 and friends. --- src/include/override/sys/generate-syscall.py | 4 ++++ src/include/override/sys/syscall.h | 4 ++++ src/shared/base-filesystem.c | 4 ++++ src/shared/seccomp-util.c | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/src/include/override/sys/generate-syscall.py b/src/include/override/sys/generate-syscall.py index b58f1d6bcf..2a03623dbb 100644 --- a/src/include/override/sys/generate-syscall.py +++ b/src/include/override/sys/generate-syscall.py @@ -44,6 +44,10 @@ HEADER = '''\ #include_next +#ifdef ARCH_MIPS +#include +#endif + #include ''' diff --git a/src/include/override/sys/syscall.h b/src/include/override/sys/syscall.h index 894394a76b..f069e5f3c2 100644 --- a/src/include/override/sys/syscall.h +++ b/src/include/override/sys/syscall.h @@ -8,6 +8,10 @@ #include_next +#ifdef ARCH_MIPS +#include +#endif + #include /* Note: if this code looks strange, this is because it is derived from the same diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c index 080e13a17a..bad3b46f3a 100644 --- a/src/shared/base-filesystem.c +++ b/src/shared/base-filesystem.c @@ -5,6 +5,10 @@ #include #include +#ifdef ARCH_MIPS +#include +#endif + #include "alloc-util.h" #include "base-filesystem.h" #include "errno-util.h" diff --git a/src/shared/seccomp-util.c b/src/shared/seccomp-util.c index 3c61f82371..5e82a12504 100644 --- a/src/shared/seccomp-util.c +++ b/src/shared/seccomp-util.c @@ -8,6 +8,10 @@ #include #include +#ifdef ARCH_MIPS +#include +#endif + #include "af-list.h" #include "alloc-util.h" #include "env-util.h"