1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 04:47:34 +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:
Andreas Kling 2020-08-11 18:59:48 +02:00
parent 9ba9228a6b
commit eeb9042b8e

View file

@ -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);