fix build on Solaris, fix compiler warning (bb #1234)

git-svn: trunk@4256
0.95
Török Edvin 17 years ago
parent c702906433
commit 0a0ae0b407
  1. 4
      ChangeLog
  2. 12
      freshclam/manager.c

@ -1,3 +1,7 @@
Tue Oct 14 21:08:10 EEST 2008 (edwin)
-------------------------------------
* freshclam/manager.c: fix build on Solaris, fix compiler warning (bb #1234)
Mon Oct 13 12:22:02 CEST 2008 (tk) Mon Oct 13 12:22:02 CEST 2008 (tk)
---------------------------------- ----------------------------------
* clamd/server.h: drop dead code (bb#1231) * clamd/server.h: drop dead code (bb#1231)

@ -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++;

Loading…
Cancel
Save