From 6c4151fab6e8aca7f9f4160cb3b8c01a08a26c8c Mon Sep 17 00:00:00 2001 From: Marco van Wieringen Date: Wed, 5 Aug 2015 14:41:10 +0200 Subject: [PATCH] Fix windows build. As on windows the binaries are started and stopped using the layered approach we need the terminate functions of the dir and sd to be non-static. --- src/dird/dird.c | 8 +++++++- src/stored/stored.c | 10 ++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/dird/dird.c b/src/dird/dird.c index baef525f097..f3fc5fe7494 100644 --- a/src/dird/dird.c +++ b/src/dird/dird.c @@ -42,7 +42,10 @@ int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result); #endif /* Forward referenced subroutines */ -static void terminate_dird(int sig); +#if !defined(HAVE_WIN32) +static +#endif +void terminate_dird(int sig); static bool check_resources(); static bool initialize_sql_pooling(void); static void cleanup_old_files(); @@ -388,6 +391,9 @@ int main (int argc, char *argv[]) } /* Cleanup and then exit */ +#if !defined(HAVE_WIN32) +static +#endif void terminate_dird(int sig) { static bool already_here = false; diff --git a/src/stored/stored.c b/src/stored/stored.c index d79b3c3ec74..298bf1a7690 100644 --- a/src/stored/stored.c +++ b/src/stored/stored.c @@ -39,7 +39,10 @@ extern bool parse_sd_config(CONFIG *config, const char *configfile, int exit_code); /* Forward referenced functions */ -static void terminate_stored(int sig); +#if !defined(HAVE_WIN32) +static +#endif +void terminate_stored(int sig); static int check_resources(); static void cleanup_old_files(); @@ -667,7 +670,10 @@ void *device_initialization(void *arg) /* * Clean up and then exit */ -static void terminate_stored(int sig) +#if !defined(HAVE_WIN32) +static +#endif +void terminate_stored(int sig) { static bool in_here = false; DEVRES *device;