Building a testdir of 'selinux-h' on MSVC, I get these errors: .\selinux/selinux.h(87): error C2059: syntax error: ',' .\selinux/selinux.h(87): error C2059: syntax error: ';' .\selinux/selinux.h(87): error C2061: syntax error: identifier 'm' .\selinux/selinux.h(87): error C2081: 'mode_t': name in formal parameter list illegal .\selinux/selinux.h(87): error C2146: syntax error: missing ')' before identifier 'm' .\selinux/selinux.h(88): error C2059: syntax error: ')'
Fixed as follows. 2025-05-25 Bruno Haible <[email protected]> selinux-h: Fix error with MSVC. * lib/se-selinux.in.h: Add comment. * modules/selinux-h (Depends-on): Add sys_types-h. diff --git a/lib/se-selinux.in.h b/lib/se-selinux.in.h index 492b239bbb..6ddd273b2a 100644 --- a/lib/se-selinux.in.h +++ b/lib/se-selinux.in.h @@ -33,7 +33,7 @@ # error "Please include config.h first." # endif -# include <sys/types.h> +# include <sys/types.h> /* for mode_t */ # include <errno.h> _GL_INLINE_HEADER_BEGIN diff --git a/modules/selinux-h b/modules/selinux-h index 2a6074daf3..ae5841e0ef 100644 --- a/modules/selinux-h +++ b/modules/selinux-h @@ -15,6 +15,7 @@ m4/selinux-selinux-h.m4 Depends-on: errno-h +sys_types-h extern-inline gen-header
