diff options
author | mike <mike@FreeBSD.org> | 2002-04-20 02:26:43 +0000 |
---|---|---|
committer | mike <mike@FreeBSD.org> | 2002-04-20 02:26:43 +0000 |
commit | a65eab0c346b3fd412a6e32a97e9e45801a6a5b0 (patch) | |
tree | 674f715c0ea8a05ebacf961623477e39abd9bbf4 | |
parent | 39f7a31d8080bfe4427a83cb28ee01fef0e3831a (diff) | |
download | FreeBSD-src-a65eab0c346b3fd412a6e32a97e9e45801a6a5b0.zip FreeBSD-src-a65eab0c346b3fd412a6e32a97e9e45801a6a5b0.tar.gz |
Add typedef of sa_family_t to <sys/un.h>, per POSIX and X/Open. Hide
portions of <sys/un.h> when a standard has been requested.
-rw-r--r-- | sys/sys/un.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/sys/un.h b/sys/sys/un.h index e0f14f7..42a8b48 100644 --- a/sys/sys/un.h +++ b/sys/sys/un.h @@ -37,15 +37,25 @@ #ifndef _SYS_UN_H_ #define _SYS_UN_H_ +#include <sys/cdefs.h> +#include <sys/_types.h> + +#ifdef _BSD_SA_FAMILY_T_ +typedef _BSD_SA_FAMILY_T_ sa_family_t; +#undef _BSD_SA_FAMILY_T_ +#endif + /* * Definitions for UNIX IPC domain. */ struct sockaddr_un { u_char sun_len; /* sockaddr len including null */ - u_char sun_family; /* AF_UNIX */ + sa_family_t sun_family; /* AF_UNIX */ char sun_path[104]; /* path name (gag) */ }; +#if __BSD_VISIBLE + /* Socket options. */ #define LOCAL_PEERCRED 0x001 /* retrieve peer credentails */ @@ -62,6 +72,7 @@ void unp_dispose(struct mbuf *m); int unp_externalize(struct mbuf *mbuf, struct mbuf **controlp); void unp_init(void); extern struct pr_usrreqs uipc_usrreqs; + #else /* !_KERNEL */ /* actual length of an initialized sockaddr_un */ @@ -70,4 +81,6 @@ extern struct pr_usrreqs uipc_usrreqs; #endif /* _KERNEL */ +#endif /* __BSD_VISIBLE */ + #endif /* !_SYS_UN_H_ */ |