summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2019-11-01 20:11:08 -0400
committerRich Felker <dalias@aerifal.cx>2019-11-02 18:30:56 -0400
commitc71dbb24c947dc14f43960bfec4da670fccba580 (patch)
treea2430f8fb3c64fcf87a339b63485b51d698a50df /include
parent38143339646a4ccce8afe298c34467767c899f51 (diff)
downloadmusl-c71dbb24c947dc14f43960bfec4da670fccba580.tar.gz
move time64 socket options from arch bits to top-level sys/socket.h
now that all 32-bit archs have 64-bit time types, the values for the time-related socket option macros can be treated as universal for 32-bit archs. the sys/socket.h mechanism for this predates arch/generic and is instead in the top-level header. x32, which does not use the new time64 values of the macros, already has its own overrides, so this commit does not affect it.
Diffstat (limited to 'include')
-rw-r--r--include/sys/socket.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/sys/socket.h b/include/sys/socket.h
index 4ea7be1e..a1c0b01c 100644
--- a/include/sys/socket.h
+++ b/include/sys/socket.h
@@ -225,15 +225,26 @@ struct linger {
#endif
#ifndef SO_RCVTIMEO
+#if __LONG_MAX == 0x7fffffff
+#define SO_RCVTIMEO 66
+#define SO_SNDTIMEO 67
+#else
#define SO_RCVTIMEO 20
#define SO_SNDTIMEO 21
#endif
+#endif
#ifndef SO_TIMESTAMP
+#if __LONG_MAX == 0x7fffffff
+#define SO_TIMESTAMP 63
+#define SO_TIMESTAMPNS 64
+#define SO_TIMESTAMPING 65
+#else
#define SO_TIMESTAMP 29
#define SO_TIMESTAMPNS 35
#define SO_TIMESTAMPING 37
#endif
+#endif
#define SO_SECURITY_AUTHENTICATION 22
#define SO_SECURITY_ENCRYPTION_TRANSPORT 23