Browse code

Fix compilation errors on BeOS

git-svn: trunk@2745

Nigel Horne authored on 2007/02/14 04:05:28
Showing 3 changed files
... ...
@@ -1,3 +1,7 @@
1
+Tue Feb 13 19:04:35 GMT 2007 (njh)
2
+----------------------------------
3
+  * libclamav/mbox.c,phishcheck.c:	Fix compilation errors on BeOS
4
+
1 5
 Tue Feb 13 14:42:15 CET 2007 (tk)
2 6
 ---------------------------------
3 7
   * 0.90 (released with JS and PST code removed)
... ...
@@ -16,7 +16,7 @@
16 16
  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17 17
  *  MA 02110-1301, USA.
18 18
  */
19
-static	char	const	rcsid[] = "$Id: mbox.c,v 1.378 2007/02/13 13:04:40 njh Exp $";
19
+static	char	const	rcsid[] = "$Id: mbox.c,v 1.379 2007/02/13 19:04:07 njh Exp $";
20 20
 
21 21
 #ifdef	_MSC_VER
22 22
 #include <winsock.h>	/* only needed in CL_EXPERIMENTAL */
... ...
@@ -101,7 +101,11 @@ static	void	print_trace(int use_syslog);
101 101
 #endif
102 102
 
103 103
 #ifdef	HAVE_STDBOOL_H
104
+#ifdef	C_BEOS
105
+#include "SupportDefs.h"
106
+#else
104 107
 #include <stdbool.h>
108
+#endif
105 109
 #else
106 110
 #ifdef	FALSE
107 111
 typedef	unsigned	char	bool;
... ...
@@ -167,9 +171,11 @@ typedef	enum {
167 167
 #include <netdb.h>
168 168
 #include <sys/socket.h>
169 169
 #include <netinet/in.h>
170
+#ifndef	C_BEOS
170 171
 #include <net/if.h>
171 172
 #include <arpa/inet.h>
172 173
 #endif
174
+#endif
173 175
 
174 176
 #ifndef	C_WINDOWS
175 177
 #define	closesocket(s)	close(s)
... ...
@@ -4338,6 +4344,7 @@ getURL(struct arg *arg)
4338 4338
 	}
4339 4339
 	cli_dbgmsg("Saving %s to %s\n", url, fout);
4340 4340
 
4341
+#ifndef	C_BEOS
4341 4342
 	if(tcp == 0) {
4342 4343
 		const struct protoent *proto = getprotobyname("tcp");
4343 4344
 
... ...
@@ -4351,6 +4358,7 @@ getURL(struct arg *arg)
4351 4351
 		endprotoent();
4352 4352
 #endif
4353 4353
 	}
4354
+#endif
4354 4355
 	if(default_port == 0) {
4355 4356
 		const struct servent *servent = getservbyname("http", "tcp");
4356 4357
 
... ...
@@ -19,6 +19,9 @@
19 19
  *  MA 02110-1301, USA.
20 20
  *
21 21
  *  $Log: phishcheck.c,v $
22
+ *  Revision 1.23  2007/02/13 19:04:07  njh
23
+ *  Fix compilation errors on BeOS
24
+ *
22 25
  *  Revision 1.22  2007/02/12 20:34:31  tkojm
23 26
  *  fix hexurl regex (bb#288)
24 27
  *
... ...
@@ -182,8 +185,6 @@ case CL_PHISH_HOST_NOT_LISTED:
182 182
 #include <regex.h>
183 183
 #endif
184 184
 
185
-#include <pthread.h>
186
-
187 185
 #include "others.h"
188 186
 #include "defaults.h"
189 187
 #include "str.h"