aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/un.h
diff options
context:
space:
mode:
authorMike Barcroft <mike@FreeBSD.org>2002-04-20 02:26:43 +0000
committerMike Barcroft <mike@FreeBSD.org>2002-04-20 02:26:43 +0000
commitc636dc438189747d2397388614a19458fce9ee89 (patch)
tree674f715c0ea8a05ebacf961623477e39abd9bbf4 /sys/sys/un.h
parentc6e43821cd19506ca3f153231f5fa4b840e9d80e (diff)
downloadsrc-c636dc438189747d2397388614a19458fce9ee89.tar.gz
src-c636dc438189747d2397388614a19458fce9ee89.zip
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.
Notes
Notes: svn path=/head/; revision=95100
Diffstat (limited to 'sys/sys/un.h')
-rw-r--r--sys/sys/un.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/sys/un.h b/sys/sys/un.h
index e0f14f743a32..42a8b4851c96 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_ */