From 95cb9068ca1f3376b897969daf6eb65179353f2b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 4 Aug 1997 14:29:00 +0000 Subject: [PATCH] Define socklen_t. (struct msghdr): Correct types to use socklen_t. --- sysdeps/unix/sysv/linux/mips/bits/socket.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h index 15f420fc9c..02f1d22a6c 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/socket.h +++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h @@ -28,9 +28,11 @@ #define __need_NULL #include - __BEGIN_DECLS +/* Type for length arguments in socket calls. */ +typedef unsigned int socklen_t; + /* Supported address families. */ #define PF_UNSPEC 0 #define PF_UNIX 1 /* Unix domain sockets */ @@ -103,25 +105,22 @@ enum struct msghdr { __ptr_t msg_name; /* Address to send to/receive from. */ - int msg_namelen; /* Length of address data. */ - /* XXX Should be type `size_t' according to POSIX.1g. */ + socklen_t msg_namelen; /* Length of address data. */ struct iovec *msg_iov; /* Vector of data to send/receive into. */ int msg_iovlen; /* Number of elements in the vector. */ - /* XXX Should be type `size_t' according to POSIX.1g. */ __ptr_t msg_control; /* Ancillary data (eg BSD filedesc passing). */ - int msg_controllen; /* Ancillary data buffer length. */ - /* XXX Should be type `size_t' according to POSIX.1g. */ + socklen_t msg_controllen; /* Ancillary data buffer length. */ + int msg_flags; /* Flags on received message. */ }; /* Structure used for storage of ancillary data object information. */ struct cmsghdr { - int cmsg_len; /* Length of data in cmsg_data plus length + socklen_t cmsg_len; /* Length of data in cmsg_data plus length of cmsghdr structure. */ - /* XXX Should be type `size_t' according to POSIX.1g. */ int cmsg_level; /* Originating protocol. */ int cmsg_type; /* Protocol specific type. */ #if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2