[gcc r14-10022] [testsuite] [analyzer] include sys/select.h if available
Alexandre Oliva
aoliva@gcc.gnu.org
Thu Apr 18 11:15:16 GMT 2024
https://gcc.gnu.org/g:e965162bb9de6d2cd68cdc0e26dda56abd25fcdf
commit r14-10022-ge965162bb9de6d2cd68cdc0e26dda56abd25fcdf
Author: Alexandre Oliva <oliva@adacore.com>
Date: Thu Apr 18 08:01:21 2024 -0300
[testsuite] [analyzer] include sys/select.h if available
Test that calls select fails on vxworks because select is only
declared in sys/select.h. Include that header if it's present.
for gcc/testsuite/ChangeLog
* gcc.dg/analyzer/fd-glibc-byte-stream-connection-server.c:
Include sys/select.h if present.
Diff:
---
gcc/testsuite/gcc.dg/analyzer/fd-glibc-byte-stream-connection-server.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/gcc/testsuite/gcc.dg/analyzer/fd-glibc-byte-stream-connection-server.c b/gcc/testsuite/gcc.dg/analyzer/fd-glibc-byte-stream-connection-server.c
index fcbcc740170..f922a52238f 100644
--- a/gcc/testsuite/gcc.dg/analyzer/fd-glibc-byte-stream-connection-server.c
+++ b/gcc/testsuite/gcc.dg/analyzer/fd-glibc-byte-stream-connection-server.c
@@ -8,6 +8,9 @@
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
+#if __has_include(<sys/select.h>)
+#include <sys/select.h>
+#endif
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
More information about the Gcc-cvs
mailing list