netstress: Add imports for TCP_FASTOPEN definition
PATCH 1/1 netstress: Add imports for TCP_FASTOPEN definition
+ add necessary autoconf checks for these headers.
Signed-off-by Petr Vorel <[email protected]>
--- configure.ac | 2 ++ testcases/network/netstress/netstress.c | 8 ++++++++ 2 files changed, 10 insertions(+)
configure.ac +2 -0
@@ -39,7 +39,9 @@ AC_CHECK_HEADERS([ \ linux/mempolicy.h \ linux/module.h \ linux/netlink.h \ + linux/tcp.h \ mm.h \ + netinet/tcp.h \ pthread.h \ sys/epoll.h \ sys/fanotify.h \
testcases/network/netstress/netstress.c +8 -0
@@ -18,6 +18,8 @@* */ +#include "config.h" +#include <pthread.h> #include <stdlib.h> #include <limits.h>
@@ -32,6 +34,12 @@#include <unistd.h> #include <errno.h> +#ifdef HAVE_LINUX_TCP_H +#include <linux/tcp.h> +#elif defined(HAVE_NETINET_TCP_H ) +#include <netinet/tcp.h> +#endif +#include "lapi/posix_clocks.h" #include "tst_safe_pthread.h" #include "tst_test.h"
Signature · 1 line
2.14.2
PATCH 1/1 netstress: Add imports for TCP_FASTOPEN definition
Quoted 1 line · Petr Vorel
+ add necessary autoconf checks for these headers.
Looks good but I wouldn't include it in the test itself but move these defines with your changes into lapi/tcp.h, others like MSG_FASTOPEN, SOL_DCCP, SO_BUSY_POLL can be moved to lapi/socket.h.
Thanks,
Alexey