]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Fix compilation warning
authorEric Bollengier <eric@baculasystems.com>
Thu, 24 Mar 2022 08:21:13 +0000 (09:21 +0100)
committerEric Bollengier <eric@baculasystems.com>
Thu, 24 Mar 2022 08:21:13 +0000 (09:21 +0100)
bacula/src/lib/bcollector.c
bacula/src/lib/bpipe.c
bacula/src/lib/status.h

index 0875763bcf548ea66d54d9a362783eef6d4dff17..659a86e8e3ee3b053758d46b4bef2d9ae64b6a25 100644 (file)
@@ -28,6 +28,7 @@
 #include "bacula.h"
 #include "parse_conf.h"
 #include "jcr.h"
+#define STATUS_FUNCTIONS
 #include "status.h"
 #include <time.h>
 
index 057392fb6bf4030b7b239ad01796a04533bedebf..32b10fb5ee0ba448885eb23248bec7d77a6a7f32 100644 (file)
@@ -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. */
index f4861b00279ef19f7c1b36327b3d16a89be6d697..58e36e5ca5eed40a91bbb486f5fe6105db3e702c 100644 (file)
@@ -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)
 {