diff options
| author | Florian Weimer <fweimer@redhat.com> | 2022-01-17 10:21:34 +0100 |
|---|---|---|
| committer | Florian Weimer <fweimer@redhat.com> | 2022-01-17 11:44:41 +0100 |
| commit | 5575daae5099e779bb860b566b4d608418a5b832 (patch) | |
| tree | 3bc5ef6c685e1f042082f98ef522a879b87a21ca /include | |
| parent | 03e6e02e6a216cfb913f49b3be80d5088603864f (diff) | |
| download | glibc-5575daae5099e779bb860b566b4d608418a5b832.tar.xz glibc-5575daae5099e779bb860b566b4d608418a5b832.zip | |
socket: Add the __sockaddr_un_set function
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
(cherry picked from commit e368b12f6c16b6888dda99ba641e999b9c9643c8)
Diffstat (limited to 'include')
| -rw-r--r-- | include/sys/un.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/sys/un.h b/include/sys/un.h index bdbee99980..152afd9fc7 100644 --- a/include/sys/un.h +++ b/include/sys/un.h @@ -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 */ |
