mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-01 23:40:22 +00:00
Define socklen_t.
(struct msghdr): Correct types to use socklen_t.
This commit is contained in:
parent
e1da12893a
commit
95cb9068ca
@ -28,9 +28,11 @@
|
||||
#define __need_NULL
|
||||
#include <stddef.h>
|
||||
|
||||
|
||||
__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
|
||||
|
Loading…
Reference in New Issue
Block a user