this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix up Linux socket definitions to use arch-dependent types

This is how the structures are actually defined, so this is what we need
to be correct on all architectures (e.g. i386).

+8 -5
+8 -5
src/kernel/emulation/linux/network/recvmsg.h
··· 1 1 #ifndef LINUX_RECVMSG_H 2 2 #define LINUX_RECVMSG_H 3 3 #include <stdint.h> 4 + #include <stddef.h> 5 + 6 + typedef uint32_t linux_socklen_t; 4 7 5 8 struct iovec; 6 9 struct bsd_msghdr ··· 17 20 struct linux_msghdr 18 21 { 19 22 void* msg_name; 20 - uint32_t msg_namelen; 23 + linux_socklen_t msg_namelen; 21 24 struct iovec* msg_iov; 22 - unsigned long msg_iovlen; 25 + size_t msg_iovlen; 23 26 void* msg_control; 24 - unsigned long msg_controllen; 27 + size_t msg_controllen; 25 28 int msg_flags; 26 29 }; 27 30 ··· 35 38 36 39 struct linux_cmsghdr 37 40 { 38 - unsigned long cmsg_len; 41 + size_t cmsg_len; 39 42 int cmsg_level; 40 43 int cmsg_type; 41 44 unsigned char cmsg_data[]; ··· 53 56 #define BSD_CMSG_SPACE(len) (BSD_CMSG_ALIGN(sizeof(struct bsd_cmsghdr)) + BSD_CMSG_ALIGN(len)) 54 57 #define BSD_CMSG_LEN(len) (BSD_CMSG_ALIGN(sizeof(struct bsd_cmsghdr)) + (len)) 55 58 56 - #define LINUX_CMSG_ALIGN(len) (((len) + sizeof(unsigned long) - 1) & (size_t)~(sizeof(unsigned long) - 1)) 59 + #define LINUX_CMSG_ALIGN(len) (((len) + sizeof(size_t) - 1) & (size_t)~(sizeof(size_t) - 1)) 57 60 #define LINUX_CMSG_SPACE(len) (LINUX_CMSG_ALIGN(sizeof(struct linux_cmsghdr)) + LINUX_CMSG_ALIGN(len)) 58 61 #define LINUX_CMSG_LEN(len) (LINUX_CMSG_ALIGN(sizeof(struct linux_cmsghdr)) + (len)) 59 62