Skip to content

Commit

Permalink
daemon-namespaces: some corrections for win32 cross-build
Browse files Browse the repository at this point in the history
  • Loading branch information
franku committed Aug 20, 2018
1 parent 2e329aa commit 58dc176
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
14 changes: 10 additions & 4 deletions core/src/dird/dird.cc
Expand Up @@ -61,10 +61,13 @@ int Readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
using namespace directordaemon;

/* Forward referenced subroutines */
#if !defined(HAVE_WIN32)
static
#endif
void TerminateDird(int sig);
namespace directordaemon {
#if !defined(HAVE_WIN32)
static
#endif
void TerminateDird(int sig);
}

static bool CheckResources();
static bool InitializeSqlPooling(void);
static void CleanUpOldFiles();
Expand Down Expand Up @@ -459,6 +462,8 @@ int main (int argc, char *argv[])
* Cleanup and then exit
*
*/
namespace directordaemon {

#if !defined(HAVE_WIN32)
static
#endif
Expand Down Expand Up @@ -510,6 +515,7 @@ void TerminateDird(int sig)

exit(sig);
}
} /* namespace directordaemon */

/**
* If we get here, we have received a SIGHUP, which means to reread our configuration file.
Expand Down
2 changes: 1 addition & 1 deletion core/src/dird/ndmp_fhdb_mem.cc
Expand Up @@ -848,5 +848,5 @@ void NdmpFhdbMemProcessDb(struct ndmlog *ixlog)
}
}

} /* namespace directordaemon */
#endif /* #if HAVE_NDMP */
} /* namespace directordaemon */
2 changes: 1 addition & 1 deletion core/src/win32/dird/who.h
Expand Up @@ -27,7 +27,7 @@
#define APP_DESC "Bareos Director Service"
#define SERVICE_DESC "Provides bareos director services."

#define TerminateApp(x) TerminateDird(x)
#define TerminateApp(x) directordaemon::TerminateDird(x)
namespace directordaemon {
extern void TerminateDird(int sig);
} /* namespace directordaemon */
2 changes: 1 addition & 1 deletion core/src/win32/filed/who.h
Expand Up @@ -27,7 +27,7 @@
#define APP_DESC "Bareos File Backup Service"
#define SERVICE_DESC "Provides file backup and restore services (bareos client)."

#define TerminateApp(x) TerminateFiled(x)
#define TerminateApp(x) filedaemon::TerminateFiled(x)
namespace filedaemon {
void TerminateFiled(int sig);
} /* namespace filedaemon */
2 changes: 1 addition & 1 deletion core/src/win32/stored/who.h
Expand Up @@ -27,7 +27,7 @@
#define APP_DESC "Bareos Storage Service"
#define SERVICE_DESC "Provides bareos storage services."

#define TerminateApp(x) TerminateStored(x)
#define TerminateApp(x) storagedaemon::TerminateStored(x)
namespace storagedaemon {
extern void TerminateStored(int sig);
} /* namespace storagedaemon */

0 comments on commit 58dc176

Please sign in to comment.