Mercurial > sm-archive
comparison src/sm-archive.cpp @ 10:f9e8bbf33a2a
more fixes for solaris
author | carl |
---|---|
date | Tue, 30 Jan 2007 16:28:16 -0800 |
parents | 48880e61ce5e |
children | 75e1a9bcbc2e |
comparison
equal
deleted
inserted
replaced
9:48880e61ce5e | 10:f9e8bbf33a2a |
---|---|
43 #ifndef HAVE_DAEMON | 43 #ifndef HAVE_DAEMON |
44 #include "daemon.h" | 44 #include "daemon.h" |
45 #include "daemon.c" | 45 #include "daemon.c" |
46 #endif | 46 #endif |
47 | 47 |
48 static char* smarchive_version="$Id$"; | 48 static const char* smarchive_version="$Id$"; |
49 | 49 |
50 | 50 |
51 extern "C" { | 51 extern "C" { |
52 #include <libmilter/mfapi.h> | 52 #include <libmilter/mfapi.h> |
53 sfsistat mlfi_connect(SMFICTX *ctx, char *hostname, _SOCK_ADDR *hostaddr); | 53 sfsistat mlfi_connect(SMFICTX *ctx, char *hostname, _SOCK_ADDR *hostaddr); |
271 //////////////////////////////////////////////// | 271 //////////////////////////////////////////////// |
272 // thread to watch the old config files for changes | 272 // thread to watch the old config files for changes |
273 // and reload when needed. we also cleanup old | 273 // and reload when needed. we also cleanup old |
274 // configs whose reference count has gone to zero. | 274 // configs whose reference count has gone to zero. |
275 // | 275 // |
276 void* config_loader(void *arg); | 276 extern "C" {void* config_loader(void *arg);} |
277 void* config_loader(void *arg) { | 277 void* config_loader(void *arg) { |
278 typedef set<CONFIG *> configp_set; | 278 typedef set<CONFIG *> configp_set; |
279 configp_set old_configs; | 279 configp_set old_configs; |
280 while (loader_run) { | 280 while (loader_run) { |
281 sleep(180); // look for modifications every 3 minutes | 281 sleep(180); // look for modifications every 3 minutes |