* [LTP] [PATCH 1/1] netstress: Add imports for TCP_FASTOPEN definition
@ 2017-10-31 13:45 Petr Vorel
2017-11-08 11:23 ` Alexey Kodanev
0 siblings, 1 reply; 2+ messages in thread
From: Petr Vorel @ 2017-10-31 13:45 UTC (permalink / raw)
To: ltp
+ add necessary autoconf checks for these headers.
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
configure.ac | 2 ++
testcases/network/netstress/netstress.c | 8 ++++++++
2 files changed, 10 insertions(+)
diff --git a/configure.ac b/configure.ac
index 5f1cd3bfb..1f1f53eb0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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 \
diff --git a/testcases/network/netstress/netstress.c b/testcases/network/netstress/netstress.c
index 4b211aa75..5e3aca1a1 100644
--- a/testcases/network/netstress/netstress.c
+++ b/testcases/network/netstress/netstress.c
@@ -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"
--
2.14.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [LTP] [PATCH 1/1] netstress: Add imports for TCP_FASTOPEN definition
2017-10-31 13:45 [LTP] [PATCH 1/1] netstress: Add imports for TCP_FASTOPEN definition Petr Vorel
@ 2017-11-08 11:23 ` Alexey Kodanev
0 siblings, 0 replies; 2+ messages in thread
From: Alexey Kodanev @ 2017-11-08 11:23 UTC (permalink / raw)
To: ltp
On 10/31/2017 04:45 PM, Petr Vorel wrote:
> + 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-11-08 11:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-31 13:45 [LTP] [PATCH 1/1] netstress: Add imports for TCP_FASTOPEN definition Petr Vorel
2017-11-08 11:23 ` Alexey Kodanev
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.