fix debugger tracking of shared libraries on mips with PIE main program
[musl] / include / sys / socket.h
index 6be699d..6dc1e40 100644 (file)
@@ -19,6 +19,40 @@ extern "C" {
 
 #include <bits/socket.h>
 
+struct msghdr {
+       void *msg_name;
+       socklen_t msg_namelen;
+       struct iovec *msg_iov;
+#if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __BIG_ENDIAN
+       int __pad1;
+#endif
+       int msg_iovlen;
+#if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __LITTLE_ENDIAN
+       int __pad1;
+#endif
+       void *msg_control;
+#if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __BIG_ENDIAN
+       int __pad2;
+#endif
+       socklen_t msg_controllen;
+#if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __LITTLE_ENDIAN
+       int __pad2;
+#endif
+       int msg_flags;
+};
+
+struct cmsghdr {
+#if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __BIG_ENDIAN
+       int __pad1;
+#endif
+       socklen_t cmsg_len;
+#if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __LITTLE_ENDIAN
+       int __pad1;
+#endif
+       int cmsg_level;
+       int cmsg_type;
+};
+
 #ifdef _GNU_SOURCE
 struct ucred {
        pid_t pid;
@@ -191,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
@@ -243,6 +288,9 @@ struct linger {
 #define SO_TXTIME               61
 #define SCM_TXTIME              SO_TXTIME
 #define SO_BINDTOIFINDEX        62
+#define SO_DETACH_REUSEPORT_BPF 68
+#define SO_PREFER_BUSY_POLL     69
+#define SO_BUSY_POLL_BUDGET     70
 
 #ifndef SOL_SOCKET
 #define SOL_SOCKET      1