Skip to content

Commit

Permalink
Fix windows build.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Marco van Wieringen committed Aug 14, 2015
1 parent 6dd8b29 commit 6c4151f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
8 changes: 7 additions & 1 deletion src/dird/dird.c
Expand Up @@ -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();
Expand Down Expand Up @@ -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;
Expand Down
10 changes: 8 additions & 2 deletions src/stored/stored.c
Expand Up @@ -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();

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 6c4151f

Please sign in to comment.