From: Costin Lupu Date: Mon, 26 Aug 2019 14:36:34 +0000 (+0300) Subject: sys/un.h: Import from musl X-Git-Tag: RELEASE-0.4~52 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=48e60ee16e248d6fd13fcba0ea730e3b6e1400f3;p=unikraft%2Flibs%2Fnewlib.git sys/un.h: Import from musl Copied as is from the official musl git mirror git://git.musl-libc.org/musl, commit 6fcb440d. Signed-off-by: Costin Lupu Reviewed-by: Charalampos Mainas --- diff --git a/musl-imported/include/sys/un.h b/musl-imported/include/sys/un.h new file mode 100644 index 0000000..1a3193a --- /dev/null +++ b/musl-imported/include/sys/un.h @@ -0,0 +1,31 @@ +#ifndef _SYS_UN_H +#define _SYS_UN_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +#define __NEED_sa_family_t +#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) +#define __NEED_size_t +#endif + +#include + +struct sockaddr_un { + sa_family_t sun_family; + char sun_path[108]; +}; + +#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) +size_t strlen(const char *); +#define SUN_LEN(s) (2+strlen((s)->sun_path)) +#endif + +#ifdef __cplusplus +} +#endif + +#endif