fix Solaris build

git-svn: trunk@4776
0.95
Török Edvin 17 years ago
parent 086eab5c26
commit bfd89d7c84
  1. 4
      ChangeLog
  2. 2
      clamav-milter/netcode.c
  3. 12
      clamd/others.c
  4. 2
      clamd/tcpserver.c
  5. 4
      clamdscan/client.c
  6. 6
      clamdscan/proto.c
  7. 2
      clamdscan/proto.h
  8. 18
      shared/fdpassing.h
  9. 6
      shared/misc.h

@ -1,3 +1,7 @@
Fri Feb 13 13:34:21 EET 2009 (edwin)
------------------------------------
* clamav-milter/, clamd/, clamdscan/, shared/: fix Solaris build
Fri Feb 13 11:11:03 EET 2009 (edwin)
------------------------------------
* clamd/others.c, clamd/session.c: fdpassing is now in others.c

@ -22,6 +22,8 @@
#include "clamav-config.h"
#endif
/* must be first because it may define _XOPEN_SOURCE */
#include "shared/fdpassing.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

@ -26,11 +26,8 @@
#include "clamav-config.h"
#endif
#if defined HAVE_FD_PASSING && defined FDPASS_NEED_XOPEN
/* to expose BSD 4.4/Unix98 semantics instead of BSD 4.3 semantics */
#define _XOPEN_SOURCE 500
#endif
/* must be first because it may define _XOPEN_SOURCE */
#include "shared/fdpassing.h"
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
@ -87,10 +84,7 @@
#include "session.h"
#include "others.h"
#ifndef PATH_MAX
#define PATH_MAX 1024
#endif
#include "misc.h"
#ifdef C_WINDOWS
void virusaction(const char *filename, const char *virname, const struct optstruct *opts)

@ -84,7 +84,7 @@ int tcpserver(const struct optstruct *opts)
closesocket(sockfd);
return -1;
} else {
const struct optstruct *taddr = optget(opts, "TCPSocket");
const struct optstruct *taddr = optget(opts, "TCPAddr");
if(taddr->enabled)
logg("#TCP: Bound to address %s on port %u\n", taddr->strarg, optget(opts, "TCPSocket")->numarg);
else

@ -62,10 +62,6 @@
#define INADDR_LOOPBACK 0x7f000001
#endif
#ifndef PATH_MAX
#define PATH_MAX 1024
#endif
struct sockaddr *mainsa = NULL;
int mainsasz;
unsigned long int maxstream;

@ -18,6 +18,12 @@
* MA 02110-1301, USA.
*/
#if HAVE_CONFIG_H
#include "clamav-config.h"
#endif
/* must be first because it may define _XOPEN_SOURCE */
#include "shared/fdpassing.h"
#include <stdio.h>
#include <unistd.h>
#include <string.h>

@ -20,6 +20,8 @@
#ifndef PROTO_H
#define PROTO_H
#include "shared/misc.h"
struct RCVLN {
char buf[PATH_MAX+1024]; /* FIXME must match that in clamd - bb1349 */
int sockd;

@ -0,0 +1,18 @@
#ifndef FDPASSING_H
#define FDPASSING_H
#ifdef HAVE_FD_PASSING
#ifdef FDPASS_NEED_XOPEN
/* to expose BSD 4.4/Unix98 semantics instead of BSD 4.3 semantics */
#define _XOPEN_SOURCE 500
#endif
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <sys/uio.h>
#endif
#endif

@ -34,6 +34,12 @@
# endif
#endif
#include <limits.h>
#ifndef PATH_MAX
#define PATH_MAX 1024
#endif
char *freshdbdir(void);
void print_version(const char *dbdir);
int filecopy(const char *src, const char *dest);

Loading…
Cancel
Save