Reduce duplication between MD Linux code by moving msg related

struct definitions out into the compat/linux/linux_socket.h
This commit is contained in:
Dmitry Chagin 2015-05-24 18:03:14 +00:00
parent 3ce05165b1
commit b7aaa9fdb0
4 changed files with 16 additions and 48 deletions

View File

@ -447,22 +447,6 @@ struct l_sockaddr {
char sa_data[14];
};
struct l_msghdr {
l_uintptr_t msg_name;
l_int msg_namelen;
l_uintptr_t msg_iov;
l_size_t msg_iovlen;
l_uintptr_t msg_control;
l_size_t msg_controllen;
l_uint msg_flags;
};
struct l_cmsghdr {
l_size_t cmsg_len;
l_int cmsg_level;
l_int cmsg_type;
};
struct l_ifmap {
l_ulong mem_start;
l_ulong mem_end;

View File

@ -525,22 +525,6 @@ struct l_sockaddr {
char sa_data[14];
} __packed;
struct l_msghdr {
l_uintptr_t msg_name;
l_int msg_namelen;
l_uintptr_t msg_iov;
l_size_t msg_iovlen;
l_uintptr_t msg_control;
l_size_t msg_controllen;
l_uint msg_flags;
};
struct l_cmsghdr {
l_size_t cmsg_len;
l_int cmsg_level;
l_int cmsg_type;
};
struct l_ifmap {
l_ulong mem_start;
l_ulong mem_end;

View File

@ -55,6 +55,22 @@
#define LINUX_SCM_RIGHTS 0x01
#define LINUX_SCM_CREDENTIALS 0x02
struct l_msghdr {
l_uintptr_t msg_name;
l_int msg_namelen;
l_uintptr_t msg_iov;
l_size_t msg_iovlen;
l_uintptr_t msg_control;
l_size_t msg_controllen;
l_uint msg_flags;
};
struct l_cmsghdr {
l_size_t cmsg_len;
l_int cmsg_level;
l_int cmsg_type;
};
/* Ancilliary data object information macros */
#define LINUX_CMSG_ALIGN(len) roundup2(len, sizeof(l_ulong))

View File

@ -504,22 +504,6 @@ struct l_sockaddr {
char sa_data[14];
};
struct l_msghdr {
l_uintptr_t msg_name;
l_int msg_namelen;
l_uintptr_t msg_iov;
l_size_t msg_iovlen;
l_uintptr_t msg_control;
l_size_t msg_controllen;
l_uint msg_flags;
};
struct l_cmsghdr {
l_size_t cmsg_len;
l_int cmsg_level;
l_int cmsg_type;
};
struct l_ifmap {
l_ulong mem_start;
l_ulong mem_end;