summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsaper <saper@saper.info>2015-08-14 00:30:42 +0200
committerAmadeusz Sławiński <amade@asmblr.net>2015-09-05 14:35:59 +0000
commitcbda6528817e772a5f5b3af2bb67d77cdc9699dc (patch)
tree5de7930790cd7ebc3d1b6dbcfd286e24c4b3dc6f
parentbfd4662c36f4a42690ae91df0c21449a5a771a1a (diff)
downloadscreen-cbda6528817e772a5f5b3af2bb67d77cdc9699dc.tar.gz
Add trivial definitions of RFC 2292 CMSG_LEN() CMSG_SIZE()
-rw-r--r--src/socket.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/socket.c b/src/socket.c
index f1fc091..9a3f782 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -51,6 +51,13 @@
# define dirent direct
#endif
+#ifndef CMSG_LEN
+#define CMSG_LEN(length) ((_CMSG_DATA_ALIGN(sizeof(struct cmsghdr))) + (length))
+#endif
+#ifndef CMSG_SPACE
+#define CMSG_SPACE(length) ((_CMSG_DATA_ALIGN(sizeof(struct cmsghdr))) + (_CMSG_DATA_ALIGN(length)))
+#endif
+
#include "extern.h"
#include "list_generic.h"