[CRIU] [PATCH] soccr: fix 'error: ‘TCP_TIMESTAMP’ undeclared'

Adrian Reber adrian at lisas.de
Mon Sep 26 09:05:31 PDT 2016


From: Adrian Reber <areber at redhat.com>

This fixes

  CC       soccr/soccr.o
soccr/soccr.c: In function ‘get_stream_options’:
soccr/soccr.c:157:37: error: ‘TCP_TIMESTAMP’ undeclared (first use in this function)
   ret = getsockopt(sk->fd, SOL_TCP, TCP_TIMESTAMP, &val, &auxl);
                                     ^
soccr/soccr.c:157:37: note: each undeclared identifier is reported only once for each function it appears in
soccr/soccr.c: In function ‘libsoccr_set_sk_data_noq’:
soccr/soccr.c:406:35: error: ‘TCP_TIMESTAMP’ undeclared (first use in this function)
   if (setsockopt(sk->fd, SOL_TCP, TCP_TIMESTAMP,
                                   ^
make[1]: *** [soccr/soccr.o] Error 1

on older kernels like RHEL7/CentOS7 based systems.

Signed-off-by: Adrian Reber <areber at redhat.com>
---
 soccr/soccr.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/soccr/soccr.c b/soccr/soccr.c
index c27ba66..2702917 100644
--- a/soccr/soccr.c
+++ b/soccr/soccr.c
@@ -11,6 +11,10 @@
 #define SIOCOUTQNSD     0x894B
 #endif
 
+#ifndef TCP_TIMESTAMP
+#define TCP_TIMESTAMP           24
+#endif
+
 #ifndef TCP_REPAIR_WINDOW
 #define TCP_REPAIR_WINDOW       29
 #endif
-- 
2.7.4



More information about the CRIU mailing list