tests/inet_socket/connect.c: add missing include for bool
PATCH 1/1 tests/inet_socket/connect.c: add missing include for bool
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.
--- tests/inet_socket/connect.c | 1 + 1 file changed, 1 insertion(+)
tests/inet_socket/connect.c +1 -0
@@ -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>
Signature · 1 line
2.55.0
Quoted 11 lines · Ondrej Mosnacek
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]>
Quoted 20 lines
--- tests/inet_socket/connect.c | 1 + 1 file changed, 1 insertion(+)tests/inet_socket/connect.c +1
-1@@ -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
Quoted 20 lines · Stephen Smalley
Quoted 11 lines · Ondrej Mosnacek
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]>Quoted 4 lines
--- tests/inet_socket/connect.c | 1 + 1 file changed, 1 insertion(+)
Quoted 17 lines
Quoted 13 lines
tests/inet_socket/connect.c +1
-1@@ -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> --Quoted 3 lines
2.55.0
Applied: https://github.com/SELinuxProject/selinux-testsuite/commit/665bcda2e11f18c342653b0f497eee0444962d4b
Signature · 3 lines
Ondrej Mosnacek Senior Software Engineer, Linux Security - SELinux kernel Red Hat, Inc.