>From d51f6dee3644111813c54efeccad2fe26b953883 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Fri, 1 Nov 2019 10:41:02 -0400 Subject: [PATCH 6/6] convert socket option macro definitions for time64 this should be squashed as a fixup to the time64 switchover. --- arch/mips/bits/socket.h | 7 +++++-- arch/mipsn32/bits/socket.h | 7 +++++-- arch/powerpc/bits/socket.h | 7 +++++-- include/sys/socket.h | 7 +++++++ 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/arch/mips/bits/socket.h b/arch/mips/bits/socket.h index 92551b9f..4ffc4d4a 100644 --- a/arch/mips/bits/socket.h +++ b/arch/mips/bits/socket.h @@ -16,13 +16,16 @@ #define SO_RCVBUF 0x1002 #define SO_SNDLOWAT 0x1003 #define SO_RCVLOWAT 0x1004 -#define SO_RCVTIMEO 0x1006 -#define SO_SNDTIMEO 0x1005 #define SO_ERROR 0x1007 #define SO_TYPE 0x1008 #define SO_ACCEPTCONN 0x1009 #define SO_PROTOCOL 0x1028 #define SO_DOMAIN 0x1029 +#define SO_TIMESTAMP 63 +#define SO_TIMESTAMPNS 64 +#define SO_TIMESTAMPING 65 +#define SO_RCVTIMEO 66 +#define SO_SNDTIMEO 67 #define SO_NO_CHECK 11 #define SO_PRIORITY 12 diff --git a/arch/mipsn32/bits/socket.h b/arch/mipsn32/bits/socket.h index 92551b9f..4ffc4d4a 100644 --- a/arch/mipsn32/bits/socket.h +++ b/arch/mipsn32/bits/socket.h @@ -16,13 +16,16 @@ #define SO_RCVBUF 0x1002 #define SO_SNDLOWAT 0x1003 #define SO_RCVLOWAT 0x1004 -#define SO_RCVTIMEO 0x1006 -#define SO_SNDTIMEO 0x1005 #define SO_ERROR 0x1007 #define SO_TYPE 0x1008 #define SO_ACCEPTCONN 0x1009 #define SO_PROTOCOL 0x1028 #define SO_DOMAIN 0x1029 +#define SO_TIMESTAMP 63 +#define SO_TIMESTAMPNS 64 +#define SO_TIMESTAMPING 65 +#define SO_RCVTIMEO 66 +#define SO_SNDTIMEO 67 #define SO_NO_CHECK 11 #define SO_PRIORITY 12 diff --git a/arch/powerpc/bits/socket.h b/arch/powerpc/bits/socket.h index 557e324f..e5fa0f7a 100644 --- a/arch/powerpc/bits/socket.h +++ b/arch/powerpc/bits/socket.h @@ -15,8 +15,6 @@ #define SO_REUSEPORT 15 #define SO_RCVLOWAT 16 #define SO_SNDLOWAT 17 -#define SO_RCVTIMEO 18 -#define SO_SNDTIMEO 19 #define SO_PASSCRED 20 #define SO_PEERCRED 21 #define SO_ACCEPTCONN 30 @@ -25,3 +23,8 @@ #define SO_RCVBUFFORCE 33 #define SO_PROTOCOL 38 #define SO_DOMAIN 39 +#define SO_TIMESTAMP 63 +#define SO_TIMESTAMPNS 64 +#define SO_TIMESTAMPING 65 +#define SO_RCVTIMEO 66 +#define SO_SNDTIMEO 67 diff --git a/include/sys/socket.h b/include/sys/socket.h index b1dfeace..a17898ce 100644 --- a/include/sys/socket.h +++ b/include/sys/socket.h @@ -225,6 +225,13 @@ struct linger { #endif #ifndef SO_RCVTIMEO +#if __LONG_MAX == 0x7fffffff +#define SO_TIMESTAMP 63 +#define SO_TIMESTAMPNS 64 +#define SO_TIMESTAMPING 65 +#define SO_RCVTIMEO 66 +#define SO_SNDTIMEO 67 +#else #define SO_RCVTIMEO 20 #define SO_SNDTIMEO 21 #define SO_TIMESTAMP 29 -- 2.21.0