about summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-01-31 06:16:26 +0000
committerUlrich Drepper <drepper@redhat.com>2001-01-31 06:16:26 +0000
commit3f66a0cf1b9c630cb5bb2ea8a9e2068aa4c0c6f9 (patch)
treeb3fad6bde151b2cc0f771d4860e238fbc6fcfa9f /include
parent48d99185e3c261d7735d446fe467d6d82fc73702 (diff)
downloadglibc-3f66a0cf1b9c630cb5bb2ea8a9e2068aa4c0c6f9.tar.gz
glibc-3f66a0cf1b9c630cb5bb2ea8a9e2068aa4c0c6f9.tar.xz
glibc-3f66a0cf1b9c630cb5bb2ea8a9e2068aa4c0c6f9.zip
Update.
2001-01-30  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/generic/bits/sockaddr.h: Remove SA_LEN macro.
	* sysdeps/unix/bsd/bsd4.4/bits/sockaddr.h: Likewise.
	* include/sys/socket.h: Add SA_LEN here for internal use.
Diffstat (limited to 'include')
-rw-r--r--include/sys/socket.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/sys/socket.h b/include/sys/socket.h
index 1fc90b6014..5e97ddfb53 100644
--- a/include/sys/socket.h
+++ b/include/sys/socket.h
@@ -28,4 +28,12 @@ extern int __send (int __fd, __const void *__buf, size_t __n, int __flags);
    Return 0 on success, -1 for errors.  */
 extern int __connect (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len);
 
+/* Return the length of a `sockaddr' structure.  */
+#ifdef _HAVE_SA_LEN
+# define SA_LEN(_x)      (_x)->sa_len
+#else
+# define SA_LEN(_x)      __libc_sa_len((_x)->sa_family)
+extern int __libc_sa_len (sa_family_t __af) __THROW;
+#endif
+
 #endif