Re: [PATCH testsuite] tests/inet_socket/connect.c: add missing include for bool

Stephen Smalley <[email protected]> Mon, 3 Aug 2026 08:19:22 -0400
Newsgroups org.kernel.vger.selinux
Message-ID <CAEjxPJ4ny0BcpcYT03xwy6JKdj3sd1y8GgBa9-Fbur1jD3BJ_A@mail.gmail.com>
On Mon, Aug 3, 2026 at 5:11=E2=80=AFAM Ondrej Mosnacek <[email protected]=
> wrote:
>
> The below commit added a usage of the bool type to
> tests/inet_socket/connect.c, but didn't add the corresponding stdlib
> include (<stdbool.h>). This problem seems to be masked on Fedora (likely
> some other header file includes <stdbool.h> internally), but for example
> on CentOS 10 or 9 the compilation fails because of it.
>
> Fix it by adding the missing include.
>
> Fixes: 433c597a6a9a ("tests/inet_socket: add tests for TCP Fast Open")
> Signed-off-by: Ondrej Mosnacek <[email protected]>

Acked-by: Stephen Smalley <[email protected]>

> ---
>  tests/inet_socket/connect.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/tests/inet_socket/connect.c b/tests/inet_socket/connect.c
> index 067d196..89e85ef 100644
> --- a/tests/inet_socket/connect.c
> +++ b/tests/inet_socket/connect.c
> @@ -3,6 +3,7 @@
>  #include <netinet/in.h>
>  #include <arpa/inet.h>
>  #include <stdlib.h>
> +#include <stdbool.h>
>  #include <stdio.h>
>  #include <stddef.h>
>  #include <string.h>
> --
> 2.55.0
>
>