From: Victor Lira <victorm.l...@amd.com> The missing include prevents it from compiling when CONFIG_COVERAGE is not set and the header is included in a file that has not already included errno.h, causing EOPNOTSUPP to be undeclared.
Add the missing include. Signed-off-by: Victor Lira <victorm.l...@amd.com> --- example of the problem: diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c index 7ad870e382c..4d27f16e8ef 100644 --- a/xen/arch/arm/setup.c +++ b/xen/arch/arm/setup.c @@ -10,6 +10,7 @@ #include <xen/bootinfo.h> #include <xen/compile.h> +#include <xen/coverage.h> #include <xen/device_tree.h> #include <xen/dom0less-build.h> #include <xen/domain_page.h> --- In file included from arch/arm/setup.c:13: ./include/xen/coverage.h: In function 'sysctl_cov_op': ./include/xen/coverage.h:10:13: error: 'EOPNOTSUPP' undeclared (first use in this function) 10 | return -EOPNOTSUPP; --- xen/include/xen/coverage.h | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/include/xen/coverage.h b/xen/include/xen/coverage.h index ba5fb67947..28506c239b 100644 --- a/xen/include/xen/coverage.h +++ b/xen/include/xen/coverage.h @@ -5,6 +5,7 @@ #include <public/sysctl.h> int sysctl_cov_op(struct xen_sysctl_coverage_op *op); #else +#include <xen/errno.h> static inline int sysctl_cov_op(void *unused) { return -EOPNOTSUPP; -- 2.50.GIT