* 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:
Ingo Weinhold
2008-04-12 08:30:25 +00:00
parent dff9173818
commit ac4630e161
+7
View File
@@ -7,6 +7,7 @@
#include <stdint.h>
#include <sys/param.h>
#include <sys/types.h>
#include <sys/uio.h>
@@ -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