[LTP] [PATCH 1/2] lapi/{socket, tcp}.h: Add fallback definition for setsockopt10.c

Petr Vorel pvorel@suse.cz
Fri Oct 20 13:09:17 CEST 2023


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



More information about the ltp mailing list