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
commit eeb9042b8e
Notes: sideshowbarker 2024-07-19 03:53:23 +09:00

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