From: Eric Bollengier Date: Thu, 24 Mar 2022 08:21:13 +0000 (+0100) Subject: Fix compilation warning X-Git-Tag: Release-11.3.2~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a656bea5dd42151aa3205e1abf436a3ee84e011a;p=thirdparty%2Fbacula.git Fix compilation warning --- diff --git a/bacula/src/lib/bcollector.c b/bacula/src/lib/bcollector.c index 0875763bc..659a86e8e 100644 --- a/bacula/src/lib/bcollector.c +++ b/bacula/src/lib/bcollector.c @@ -28,6 +28,7 @@ #include "bacula.h" #include "parse_conf.h" #include "jcr.h" +#define STATUS_FUNCTIONS #include "status.h" #include diff --git a/bacula/src/lib/bpipe.c b/bacula/src/lib/bpipe.c index 057392fb6..32b10fb5e 100644 --- a/bacula/src/lib/bpipe.c +++ b/bacula/src/lib/bpipe.c @@ -84,8 +84,11 @@ BPIPE *open_bpipe(char *prog, int wait, const char *mode, char *envp[]) int mode_map = 0; BPIPE *bpipe; int save_errno; + +#if !defined(HAVE_FCNTL_F_CLOSEM) && !defined(HAVE_CLOSEFROM) struct rlimit rl; int64_t rlimitResult=0; +#endif if (!prog || !*prog) { /* execve(3) A component of the file does not name an existing file or file is an empty string. */ diff --git a/bacula/src/lib/status.h b/bacula/src/lib/status.h index f4861b002..58e36e5ca 100644 --- a/bacula/src/lib/status.h +++ b/bacula/src/lib/status.h @@ -37,6 +37,9 @@ extern void output_status(STATUS_PKT *sp); +#ifndef STATUS_FUNCTIONS +#define STATUS_FUNCTIONS + /* * Send to bsock (Director or Console) */ @@ -53,9 +56,6 @@ static void sendit(const char *msg, int len, STATUS_PKT *sp) } } -#ifndef STATUS_FUNCTIONS -#define STATUS_FUNCTIONS - /* common to SD/FD */ static void list_terminated_jobs(STATUS_PKT *sp) {