mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:47:37 +00:00
LibC: Declare sockaddr_storage
This type is guaranteed to fit the largest sockaddr_foo supported by the system. In our case, that's sockaddr_un.
This commit is contained in:
parent
9ba9228a6b
commit
eeb9042b8e
1 changed files with 7 additions and 0 deletions
|
@ -86,6 +86,13 @@ struct ucred {
|
|||
#define SO_BINDTODEVICE 7
|
||||
#define SO_KEEPALIVE 9
|
||||
|
||||
struct sockaddr_storage {
|
||||
union {
|
||||
char data[sizeof(sockaddr_un)];
|
||||
void* alignment;
|
||||
};
|
||||
};
|
||||
|
||||
int socket(int domain, int type, int protocol);
|
||||
int bind(int sockfd, const struct sockaddr* addr, socklen_t);
|
||||
int listen(int sockfd, int backlog);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue