git-svn: trunk@4256
Török Edvin authored on 2008/10/15 03:11:20... | ... |
@@ -1,3 +1,7 @@ |
1 |
+Tue Oct 14 21:08:10 EEST 2008 (edwin) |
|
2 |
+------------------------------------- |
|
3 |
+ * freshclam/manager.c: fix build on Solaris, fix compiler warning (bb #1234) |
|
4 |
+ |
|
1 | 5 |
Mon Oct 13 12:22:02 CEST 2008 (tk) |
2 | 6 |
---------------------------------- |
3 | 7 |
* clamd/server.h: drop dead code (bb#1231) |
... | ... |
@@ -25,13 +25,17 @@ |
25 | 25 |
#ifdef _MSC_VER |
26 | 26 |
#include <winsock.h> /* only needed in CL_EXPERIMENTAL */ |
27 | 27 |
#endif |
28 |
- |
|
29 |
-#define _XOPEN_SOURCE 600 |
|
30 |
- |
|
31 | 28 |
#if HAVE_CONFIG_H |
32 | 29 |
#include "clamav-config.h" |
33 | 30 |
#endif |
34 | 31 |
|
32 |
+/* for strptime, it is POSIX, but defining _XOPEN_SOURCE to 600 |
|
33 |
+ * fails on Solaris because it would require a c99 compiler, |
|
34 |
+ * 500 fails completely on Solaris, and FreeBSD, and w/o _XOPEN_SOURCE |
|
35 |
+ * strptime is not defined on Linux */ |
|
36 |
+#define _GNU_SOURCE |
|
37 |
+#define __EXTENSIONS |
|
38 |
+ |
|
35 | 39 |
#include <stdio.h> |
36 | 40 |
#include <stdlib.h> |
37 | 41 |
#ifdef HAVE_UNISTD_H |
... | ... |
@@ -585,7 +589,7 @@ int submitstats(const char *clamdcfg, const struct cfgstruct *copt) |
585 | 585 |
#endif |
586 | 586 |
*pt++ = 0; |
587 | 587 |
if(!pt) |
588 |
- pt = "NOFNAME"; |
|
588 |
+ pt = (char*) "NOFNAME"; |
|
589 | 589 |
|
590 | 590 |
qcnt += snprintf(&query[qcnt], sizeof(query) - qcnt, "ts[]=%u&fname[]=%s&virus[]=%s&", (unsigned int) epoch, pt, pt2); |
591 | 591 |
entries++; |