Browse code

Fix warnings on HP-UX

git-svn: trunk@3140

Nigel Horne authored on 2007/07/11 19:16:30
Showing 4 changed files
... ...
@@ -1,3 +1,7 @@
1
+Wed Jul 11 10:20:53 BST 2007 (njh)
2
+----------------------------------
3
+  * libclamav:	Fix warnings on HP-UX
4
+
1 5
 Wed Jul 11 10:12:36 BST 2007 (trog)
2 6
 -----------------------------------
3 7
   * libclamav: add ARJ and SFX-ARJ support
... ...
@@ -103,7 +103,7 @@ static	char	const	rcsid[] = "$Id: binhex.c,v 1.23 2007/02/12 20:46:08 njh Exp $"
103 103
 #endif
104 104
 #endif
105 105
 
106
-#if HAVE_MMAP
106
+#ifdef	HAVE_MMAP
107 107
 #if HAVE_SYS_MMAN_H
108 108
 #include <sys/mman.h>
109 109
 #else /* HAVE_SYS_MMAN_H */
... ...
@@ -4494,7 +4494,7 @@ nonblock_connect(int sock, const struct sockaddr *addr, socklen_t addrlen, int s
4494 4494
 	for (;;) {
4495 4495
 		fd_set fds;
4496 4496
 		struct timeval now;
4497
-		struct timeval wait;
4497
+		struct timeval waittime;
4498 4498
 		int n;
4499 4499
 
4500 4500
 		/* Force timeout if we ran out of time */
... ...
@@ -4505,14 +4505,14 @@ nonblock_connect(int sock, const struct sockaddr *addr, socklen_t addrlen, int s
4505 4505
 			break; /* failed */
4506 4506
 		}
4507 4507
 
4508
-		/* Calculate into 'wait' how long to wait */
4509
-		timersub(&timeout, &now, &wait); /* wait = timeout - now */
4508
+		/* Calculate into 'waittime' how long to wait */
4509
+		timersub(&timeout, &now, &waittime); /* wait = timeout - now */
4510 4510
 
4511 4511
 		/* Init fds with 'sock' as the only fd */
4512 4512
 		FD_ZERO(&fds);
4513 4513
 		FD_SET(sock, &fds);
4514 4514
 
4515
-		n = select(numfd, 0, &fds, 0, &wait);
4515
+		n = select(numfd, 0, &fds, 0, &waittime);
4516 4516
 		if (n < 0) {
4517 4517
 			cli_warnmsg("nonblock_connect: select() failure %d: errno=%d: %s\n",
4518 4518
 				select_failures, errno, strerror(errno));
... ...
@@ -24,7 +24,7 @@ static	char	const	rcsid[] = "$Id: pdf.c,v 1.61 2007/02/12 20:46:09 njh Exp $";
24 24
 #include "clamav-config.h"
25 25
 #endif
26 26
 
27
-#if HAVE_MMAP
27
+#ifdef	HAVE_MMAP
28 28
 #include <stdio.h>
29 29
 #include <sys/types.h>
30 30
 #include <sys/stat.h>