From ac4630e16137072c94a2b4ac0ba611c78f8d68e1 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sat, 12 Apr 2008 08:30:25 +0000 Subject: [PATCH] * Added 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 --- headers/posix/sys/socket.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/headers/posix/sys/socket.h b/headers/posix/sys/socket.h index e3815d87a1..00202fa8af 100644 --- a/headers/posix/sys/socket.h +++ b/headers/posix/sys/socket.h @@ -7,6 +7,7 @@ #include +#include #include #include @@ -136,6 +137,12 @@ struct cmsghdr { ((mhdr)->msg_controllen >= sizeof(struct cmsghdr) \ ? (struct cmsghdr *)(mhdr)->msg_control \ : (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