Browse code

AIX fix

git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@1319 77e5149b-7576-45b1-b177-96237e5ba77b

Tomasz Kojm authored on 2005/02/07 06:07:32
Showing 2 changed files
... ...
@@ -237,6 +237,12 @@ int readsock(int sockfd, char *buf, size_t size)
237 237
 	struct msghdr msg;
238 238
 	struct iovec iov[1];
239 239
 #ifdef HAVE_CONTROL_IN_MSGHDR
240
+#ifndef CMSG_SPACE
241
+#define CMSG_SPACE(len)	    (_CMSG_ALIGN(sizeof(struct cmsghdr)) + _CMSG_ALIGN(len))
242
+#endif
243
+#ifndef CMSG_LEN
244
+#define CMSG_LEN(len)	    (_CMSG_ALIGN(sizeof(struct cmsghdr)) + (len))
245
+#endif
240 246
 	struct cmsghdr *cmsg;
241 247
 	char tmp[CMSG_SPACE(sizeof(fd))];
242 248
 #endif
... ...
@@ -146,6 +146,12 @@ int dsfd(int sockfd, int fd, const struct optstruct *opt)
146 146
 	struct iovec iov[1];
147 147
 	struct msghdr msg;
148 148
 #ifdef HAVE_CONTROL_IN_MSGHDR
149
+#ifndef CMSG_SPACE
150
+#define CMSG_SPACE(len)	    (_CMSG_ALIGN(sizeof(struct cmsghdr)) + _CMSG_ALIGN(len))
151
+#endif
152
+#ifndef CMSG_LEN
153
+#define CMSG_LEN(len)	    (_CMSG_ALIGN(sizeof(struct cmsghdr)) + (len))
154
+#endif
149 155
 	struct cmsghdr *cmsg;
150 156
 	char tmp[CMSG_SPACE(sizeof(fd))];
151 157
 #endif