* Added <sys/param.h> include, which is needed for _ALIGN().
* Added SCM_RIGHTS macro. * Added a few non-standard but widely-used CMSG_*() macros. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24936 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/uio.h>
|
#include <sys/uio.h>
|
||||||
|
|
||||||
@@ -136,6 +137,12 @@ struct cmsghdr {
|
|||||||
((mhdr)->msg_controllen >= sizeof(struct cmsghdr) \
|
((mhdr)->msg_controllen >= sizeof(struct cmsghdr) \
|
||||||
? (struct cmsghdr *)(mhdr)->msg_control \
|
? (struct cmsghdr *)(mhdr)->msg_control \
|
||||||
: (struct cmsghdr *)NULL)
|
: (struct cmsghdr *)NULL)
|
||||||
|
#define CMSG_SPACE(len) (_ALIGN(sizeof(struct cmsghdr)) + _ALIGN(len))
|
||||||
|
#define CMSG_LEN(len) (_ALIGN(sizeof(struct cmsghdr)) + (len))
|
||||||
|
#define CMSG_ALIGN(len) _ALIGN(len)
|
||||||
|
|
||||||
|
/* SOL_SOCKET control message types */
|
||||||
|
#define SCM_RIGHTS 0x01
|
||||||
|
|
||||||
|
|
||||||
#if __cplusplus
|
#if __cplusplus
|
||||||
|
|||||||
Reference in New Issue
Block a user