public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/2] lapi/{socket, tcp}.h: Add fallback definition for setsockopt10.c
@ 2023-10-20 11:09 Petr Vorel
  2023-10-20 11:09 ` [LTP] [PATCH 2/2] setsockopt10: Use lapi/{socket, tcp}.h to fix compilation Petr Vorel
  2023-10-20 12:21 ` [LTP] [PATCH 1/2] lapi/{socket, tcp}.h: Add fallback definition for setsockopt10.c Cyril Hrubis
  0 siblings, 2 replies; 6+ messages in thread
From: Petr Vorel @ 2023-10-20 11:09 UTC (permalink / raw)
  To: ltp; +Cc: Richard Palethorpe

Both SOL_TLS and TCP_ULP definitions are from Linux 4.13, it were added
in glibc 2.27.  We still support compiling on older glibc, thus add this
definition.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 include/lapi/socket.h | 4 ++++
 include/lapi/tcp.h    | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/include/lapi/socket.h b/include/lapi/socket.h
index 794dee49f..23e7ba6cf 100644
--- a/include/lapi/socket.h
+++ b/include/lapi/socket.h
@@ -62,6 +62,10 @@
 # define SOL_ALG		279
 #endif
 
+#ifndef SOL_TLS
+# define SOL_TLS         282
+#endif
+
 #ifndef HAVE_STRUCT_MMSGHDR
 struct mmsghdr {
 	struct msghdr msg_hdr;
diff --git a/include/lapi/tcp.h b/include/lapi/tcp.h
index bb98f28f0..87c5636f6 100644
--- a/include/lapi/tcp.h
+++ b/include/lapi/tcp.h
@@ -12,6 +12,10 @@
 # define TCP_FASTOPEN	23
 #endif
 
+#ifndef TCP_ULP
+# define TCP_ULP          31
+#endif
+
 #ifndef TCP_FASTOPEN_CONNECT
 # define TCP_FASTOPEN_CONNECT	30	/* Attempt FastOpen with connect */
 #endif
-- 
2.42.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-10-23  8:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-20 11:09 [LTP] [PATCH 1/2] lapi/{socket, tcp}.h: Add fallback definition for setsockopt10.c Petr Vorel
2023-10-20 11:09 ` [LTP] [PATCH 2/2] setsockopt10: Use lapi/{socket, tcp}.h to fix compilation Petr Vorel
2023-10-20 14:34   ` Martin Doucha
2023-10-20 14:43     ` Petr Vorel
2023-10-23  8:05       ` Richard Palethorpe
2023-10-20 12:21 ` [LTP] [PATCH 1/2] lapi/{socket, tcp}.h: Add fallback definition for setsockopt10.c Cyril Hrubis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox