|
|
@ -25,13 +25,17 @@ |
|
|
|
#ifdef _MSC_VER |
|
|
|
#ifdef _MSC_VER |
|
|
|
#include <winsock.h> /* only needed in CL_EXPERIMENTAL */ |
|
|
|
#include <winsock.h> /* only needed in CL_EXPERIMENTAL */ |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#define _XOPEN_SOURCE 600 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if HAVE_CONFIG_H |
|
|
|
#if HAVE_CONFIG_H |
|
|
|
#include "clamav-config.h" |
|
|
|
#include "clamav-config.h" |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* for strptime, it is POSIX, but defining _XOPEN_SOURCE to 600
|
|
|
|
|
|
|
|
* fails on Solaris because it would require a c99 compiler, |
|
|
|
|
|
|
|
* 500 fails completely on Solaris, and FreeBSD, and w/o _XOPEN_SOURCE |
|
|
|
|
|
|
|
* strptime is not defined on Linux */ |
|
|
|
|
|
|
|
#define _GNU_SOURCE |
|
|
|
|
|
|
|
#define __EXTENSIONS |
|
|
|
|
|
|
|
|
|
|
|
#include <stdio.h> |
|
|
|
#include <stdio.h> |
|
|
|
#include <stdlib.h> |
|
|
|
#include <stdlib.h> |
|
|
|
#ifdef HAVE_UNISTD_H |
|
|
|
#ifdef HAVE_UNISTD_H |
|
|
@ -585,7 +589,7 @@ int submitstats(const char *clamdcfg, const struct cfgstruct *copt) |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
*pt++ = 0; |
|
|
|
*pt++ = 0; |
|
|
|
if(!pt) |
|
|
|
if(!pt) |
|
|
|
pt = "NOFNAME"; |
|
|
|
pt = (char*) "NOFNAME"; |
|
|
|
|
|
|
|
|
|
|
|
qcnt += snprintf(&query[qcnt], sizeof(query) - qcnt, "ts[]=%u&fname[]=%s&virus[]=%s&", (unsigned int) epoch, pt, pt2); |
|
|
|
qcnt += snprintf(&query[qcnt], sizeof(query) - qcnt, "ts[]=%u&fname[]=%s&virus[]=%s&", (unsigned int) epoch, pt, pt2); |
|
|
|
entries++; |
|
|
|
entries++; |
|
|
|