Skip to content

Commit

Permalink
abis: move cmsghdr to abis/, fix Linux ABI
Browse files Browse the repository at this point in the history
  • Loading branch information
64 committed Jul 8, 2022
1 parent 6e26abf commit 785a741
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
8 changes: 7 additions & 1 deletion abis/linux/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ struct msghdr {
size_t msg_iovlen;
void *msg_control;
size_t msg_controllen;
unsigned int msg_flags;
int msg_flags;
};

struct sockaddr_storage {
Expand All @@ -31,6 +31,12 @@ struct mmsghdr {
unsigned int msg_len;
};

struct cmsghdr {
size_t cmsg_len; /* socklen_t in POSIX */
int cmsg_level;
int cmsg_type;
};

#ifdef __cplusplus
}
#endif
Expand Down
6 changes: 6 additions & 0 deletions abis/mlibc/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ struct mmsghdr {
unsigned int msg_len;
};

struct cmsghdr {
socklen_t cmsg_len;
int cmsg_level;
int cmsg_type;
};

#ifdef __cplusplus
}
#endif
Expand Down
6 changes: 0 additions & 6 deletions options/posix/include/sys/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@ struct sockaddr {
char sa_data[14];
};

struct cmsghdr {
socklen_t cmsg_len;
int cmsg_level;
int cmsg_type;
};

// Control message format:
// The offsets marked with ^ are aligned to alignof(size_t).
//
Expand Down

0 comments on commit 785a741

Please # to comment.