kernel: some boottime sanitychecks
[minix.git] / include / sys / un.h
blobc3c4b71fe524a0ef6c48eac62033bc2781759359
1 #ifndef _SYS_UN_H_
2 #define _SYS_UN_H_
4 #include <sys/ansi.h>
5 #include <sys/featuretest.h>
6 #include <sys/types.h>
8 #ifndef sa_family_t
9 typedef __sa_family_t sa_family_t;
10 #define sa_family_t __sa_family_t
11 #endif
13 #define UNIX_PATH_MAX 127
16 * Definitions for UNIX IPC domain.
18 struct sockaddr_un {
19 sa_family_t sun_family;
20 char sun_path[UNIX_PATH_MAX];
23 #include <string.h>
25 /* Compute the actual length of a struct sockaddr_un pointed
26 * to by 'unp'. sun_path must be NULL terminated. Length does
27 * not include the NULL byte. This is not a POSIX standard
28 * definition, but BSD and Linux have it, so it is here for
29 * compatibility.
31 #define SUN_LEN(unp) \
32 ((size_t)((sizeof(*(unp)) - sizeof((unp)->sun_path)) + strlen((unp)->sun_path)))
34 #endif /* _SYS_UN_H_ */