mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
[BZ #2418]
2006-04-02 Ulrich Drepper <drepper@redhat.com> [BZ #2418] * sysdeps/unix/sysv/linux/bits/socket.h: Use larger of PATH_MAX and page size when allocating buffer.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2006-04-02 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
[BZ #2418]
|
||||||
|
* sysdeps/unix/sysv/linux/bits/socket.h: Use larger of PATH_MAX and
|
||||||
|
page size when allocating buffer.
|
||||||
|
|
||||||
2006-04-01 Ulrich Drepper <drepper@redhat.com>
|
2006-04-01 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
[BZ #2415]
|
[BZ #2415]
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* System-specific socket constants and types. Linux version.
|
/* System-specific socket constants and types. Linux version.
|
||||||
Copyright (C) 1991,1992,1994-2001, 2004 Free Software Foundation, Inc.
|
Copyright (C) 1991,1992,1994-2001,2004,2006 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -221,7 +221,10 @@ struct msghdr
|
|||||||
size_t msg_iovlen; /* Number of elements in the vector. */
|
size_t msg_iovlen; /* Number of elements in the vector. */
|
||||||
|
|
||||||
void *msg_control; /* Ancillary data (eg BSD filedesc passing). */
|
void *msg_control; /* Ancillary data (eg BSD filedesc passing). */
|
||||||
size_t msg_controllen; /* Ancillary data buffer length. */
|
size_t msg_controllen; /* Ancillary data buffer length.
|
||||||
|
!! The type should be socklen_t but the
|
||||||
|
definition of the kernel is incompatible
|
||||||
|
with this. */
|
||||||
|
|
||||||
int msg_flags; /* Flags on received message. */
|
int msg_flags; /* Flags on received message. */
|
||||||
};
|
};
|
||||||
@ -230,7 +233,10 @@ struct msghdr
|
|||||||
struct cmsghdr
|
struct cmsghdr
|
||||||
{
|
{
|
||||||
size_t cmsg_len; /* Length of data in cmsg_data plus length
|
size_t cmsg_len; /* Length of data in cmsg_data plus length
|
||||||
of cmsghdr structure. */
|
of cmsghdr structure.
|
||||||
|
!! The type should be socklen_t but the
|
||||||
|
definition of the kernel is incompatible
|
||||||
|
with this. */
|
||||||
int cmsg_level; /* Originating protocol. */
|
int cmsg_level; /* Originating protocol. */
|
||||||
int cmsg_type; /* Protocol specific type. */
|
int cmsg_type; /* Protocol specific type. */
|
||||||
#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L
|
#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L
|
||||||
|
@ -87,7 +87,7 @@ __getcwd (char *buf, size_t size)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
alloc_size = PATH_MAX;
|
alloc_size = MAX (PATH_MAX, __getpagesize ());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (buf == NULL)
|
if (buf == NULL)
|
||||||
|
Reference in New Issue
Block a user