1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-10-26 00:57:39 +03:00

socket: Add the __sockaddr_un_set function

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
This commit is contained in:
Florian Weimer
2022-01-17 10:21:34 +01:00
parent 06200aac9b
commit e368b12f6c
4 changed files with 120 additions and 1 deletions

View File

@@ -1 +1,13 @@
#include <socket/sys/un.h>
#ifndef _ISOMAC
/* Set ADDR->sun_family to AF_UNIX and ADDR->sun_path to PATHNAME.
Return 0 on success or -1 on failure (due to overlong PATHNAME).
The caller should always use sizeof (struct sockaddr_un) as the
socket address length, disregaring the length of PATHNAME.
Only concrete (non-abstract) pathnames are supported. */
int __sockaddr_un_set (struct sockaddr_un *addr, const char *pathname)
attribute_hidden;
#endif /* _ISOMAC */