* sysdeps/unix/bsd/bsd4.4/Makefile: New file. * sysdeps/unix/bsd/bsd4.4/Versions: New file. * sysdeps/unix/bsd/bsd4.4/cmsg_nxthdr.c: New file. * sysdeps/unix/bsd/bsd4.4/bits/socket.h (__cmsg_nxthdr): Correct test for cmsg struct size.
2001-08-01 Mark Kettenis <kettenis@gnu.org> * sysdeps/unix/bsd/bsd4.4/Makefile: New file. * sysdeps/unix/bsd/bsd4.4/Versions: New file. * sysdeps/unix/bsd/bsd4.4/cmsg_nxthdr.c: New file. * sysdeps/unix/bsd/bsd4.4/bits/socket.h (__cmsg_nxthdr): Correct test for cmsg struct size.
This commit is contained in:
parent
6106611a25
commit
38bb8feb80
|
@ -1,3 +1,11 @@
|
||||||
|
2001-08-01 Mark Kettenis <kettenis@gnu.org>
|
||||||
|
|
||||||
|
* sysdeps/unix/bsd/bsd4.4/Makefile: New file.
|
||||||
|
* sysdeps/unix/bsd/bsd4.4/Versions: New file.
|
||||||
|
* sysdeps/unix/bsd/bsd4.4/cmsg_nxthdr.c: New file.
|
||||||
|
* sysdeps/unix/bsd/bsd4.4/bits/socket.h (__cmsg_nxthdr): Correct
|
||||||
|
test for cmsg struct size.
|
||||||
|
|
||||||
2001-04-23 Paul Eggert <eggert@twinsun.com>
|
2001-04-23 Paul Eggert <eggert@twinsun.com>
|
||||||
|
|
||||||
* posix/getopt.h (getopt_long, getopt_long_only, _getopt_internal):
|
* posix/getopt.h (getopt_long, getopt_long_only, _getopt_internal):
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
ifeq ($(subdir),socket)
|
||||||
|
sysdep_routines += cmsg_nxthdr
|
||||||
|
endif
|
|
@ -0,0 +1,6 @@
|
||||||
|
libc {
|
||||||
|
GLIBC_2.2.5 {
|
||||||
|
# functions used in inline functions or macros
|
||||||
|
__cmsg_nxthdr;
|
||||||
|
}
|
||||||
|
}
|
|
@ -237,8 +237,8 @@ __cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW
|
||||||
|
|
||||||
__cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
|
__cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
|
||||||
+ CMSG_ALIGN (__cmsg->cmsg_len));
|
+ CMSG_ALIGN (__cmsg->cmsg_len));
|
||||||
if ((unsigned char *) (__cmsg + 1) >= ((unsigned char *) __mhdr->msg_control
|
if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control
|
||||||
+ __mhdr->msg_controllen)
|
+ __mhdr->msg_controllen)
|
||||||
|| ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
|
|| ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
|
||||||
> ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
|
> ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
|
||||||
/* No more entries. */
|
/* No more entries. */
|
||||||
|
@ -250,8 +250,12 @@ __cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW
|
||||||
/* Socket level message types. */
|
/* Socket level message types. */
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
SCM_RIGHTS = 0x01 /* Access rights. */
|
SCM_RIGHTS = 0x01, /* Access rights (array of int). */
|
||||||
#define SCM_RIGHTS SCM_RIGHTS
|
#define SCM_RIGHTS SCM_RIGHTS
|
||||||
|
SCM_TIMESTAMP = 0x02, /* Timestamp (struct timeval). */
|
||||||
|
#define SCM_TIMESTAMP SCM_TIMESTAMP
|
||||||
|
SCM_CREDS = 0x03 /* Process creds (strcm cmsgcred). */
|
||||||
|
#define SCM_CREDS SCM_CREDS
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
/* The Linux version is perfectly usable on 4.4 BSD. */
|
||||||
|
#include <sysdeps/unix/sysv/linux/cmsg_nxthdr.c>
|
Loading…
Reference in New Issue