Browse code

fix compilation error on Cobalt Qube 1

git-svn: trunk@1738

Tomasz Kojm authored on 2005/10/31 05:24:39
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Sun Oct 30 21:22:35 CET 2005 (tk)
2
+---------------------------------
3
+  * clamd/others.c: fix compilation error on Cobalt Qube 1
4
+
1 5
 Sun Oct 30 18:46:36 CET 2005 (tk)
2 6
 ---------------------------------
3 7
   * libclamav/scanners.c: fix logic bug in cli_scandesc(). Patch by Andrey J.
... ...
@@ -300,7 +300,7 @@ int writen(int fd, void *buff, unsigned int count)
300 300
 
301 301
 /* Submitted by Richard Lyons <frob-clamav*webcentral.com.au> */
302 302
 
303
-#if defined(HAVE_RECVMSG) && (defined(HAVE_ACCRIGHTS_IN_MSGHDR) || defined(HAVE_CONTROL_IN_MSGHDR)) && !defined(C_CYGWIN) && !defined(C_OS2)
303
+#if defined(HAVE_RECVMSG) && (defined(HAVE_ACCRIGHTS_IN_MSGHDR) || defined(HAVE_CONTROL_IN_MSGHDR)) && !defined(C_CYGWIN) && !defined(C_OS2) && !defined(INCOMPLETE_CMSG)
304 304
 
305 305
 int readsock(int sockfd, char *buf, size_t size)
306 306
 {
... ...
@@ -346,12 +346,10 @@ int readsock(int sockfd, char *buf, size_t size)
346 346
     cmsg = CMSG_FIRSTHDR(&msg);
347 347
     if (cmsg == NULL)
348 348
 	return -1;
349
-#ifndef INCOMPLETE_CMSG
350 349
     if (cmsg->cmsg_type != SCM_RIGHTS)
351 350
 	return -1;
352 351
     if (cmsg->cmsg_len != CMSG_LEN(sizeof(fd)))
353 352
 	return -1;
354
-#endif
355 353
     fd = *(int *)CMSG_DATA(cmsg);
356 354
 #endif
357 355
     if (fd < 0)