git-svn: trunk@4776
Török Edvin authored on 2009/02/13 20:05:14... | ... |
@@ -1,3 +1,7 @@ |
1 |
+Fri Feb 13 13:34:21 EET 2009 (edwin) |
|
2 |
+------------------------------------ |
|
3 |
+ * clamav-milter/, clamd/, clamdscan/, shared/: fix Solaris build |
|
4 |
+ |
|
1 | 5 |
Fri Feb 13 11:11:03 EET 2009 (edwin) |
2 | 6 |
------------------------------------ |
3 | 7 |
* clamd/others.c, clamd/session.c: fdpassing is now in others.c |
... | ... |
@@ -26,11 +26,8 @@ |
26 | 26 |
#include "clamav-config.h" |
27 | 27 |
#endif |
28 | 28 |
|
29 |
-#if defined HAVE_FD_PASSING && defined FDPASS_NEED_XOPEN |
|
30 |
-/* to expose BSD 4.4/Unix98 semantics instead of BSD 4.3 semantics */ |
|
31 |
-#define _XOPEN_SOURCE 500 |
|
32 |
-#endif |
|
33 |
- |
|
29 |
+/* must be first because it may define _XOPEN_SOURCE */ |
|
30 |
+#include "shared/fdpassing.h" |
|
34 | 31 |
#include <stdio.h> |
35 | 32 |
#include <stdarg.h> |
36 | 33 |
#include <stdlib.h> |
... | ... |
@@ -87,10 +84,7 @@ |
87 | 87 |
|
88 | 88 |
#include "session.h" |
89 | 89 |
#include "others.h" |
90 |
- |
|
91 |
-#ifndef PATH_MAX |
|
92 |
-#define PATH_MAX 1024 |
|
93 |
-#endif |
|
90 |
+#include "misc.h" |
|
94 | 91 |
|
95 | 92 |
#ifdef C_WINDOWS |
96 | 93 |
void virusaction(const char *filename, const char *virname, const struct optstruct *opts) |
... | ... |
@@ -84,7 +84,7 @@ int tcpserver(const struct optstruct *opts) |
84 | 84 |
closesocket(sockfd); |
85 | 85 |
return -1; |
86 | 86 |
} else { |
87 |
- const struct optstruct *taddr = optget(opts, "TCPSocket"); |
|
87 |
+ const struct optstruct *taddr = optget(opts, "TCPAddr"); |
|
88 | 88 |
if(taddr->enabled) |
89 | 89 |
logg("#TCP: Bound to address %s on port %u\n", taddr->strarg, optget(opts, "TCPSocket")->numarg); |
90 | 90 |
else |
... | ... |
@@ -18,6 +18,12 @@ |
18 | 18 |
* MA 02110-1301, USA. |
19 | 19 |
*/ |
20 | 20 |
|
21 |
+#if HAVE_CONFIG_H |
|
22 |
+#include "clamav-config.h" |
|
23 |
+#endif |
|
24 |
+ |
|
25 |
+/* must be first because it may define _XOPEN_SOURCE */ |
|
26 |
+#include "shared/fdpassing.h" |
|
21 | 27 |
#include <stdio.h> |
22 | 28 |
#include <unistd.h> |
23 | 29 |
#include <string.h> |
26 | 28 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,18 @@ |
0 |
+#ifndef FDPASSING_H |
|
1 |
+#define FDPASSING_H |
|
2 |
+ |
|
3 |
+#ifdef HAVE_FD_PASSING |
|
4 |
+ |
|
5 |
+#ifdef FDPASS_NEED_XOPEN |
|
6 |
+/* to expose BSD 4.4/Unix98 semantics instead of BSD 4.3 semantics */ |
|
7 |
+#define _XOPEN_SOURCE 500 |
|
8 |
+#endif |
|
9 |
+ |
|
10 |
+#include <sys/types.h> |
|
11 |
+#include <sys/socket.h> |
|
12 |
+#include <sys/un.h> |
|
13 |
+#include <sys/uio.h> |
|
14 |
+ |
|
15 |
+#endif |
|
16 |
+#endif |
|
17 |
+ |