[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[dm-devel] [PATCH] multipathd: Fix for 'Read environment variables from systemd'



The revision 'multipathd: Read environment variables from systemd' introduced a compilation error in multipathd/main.c:

main.c: In function ‘child’:
main.c:1651:2: error: ‘envp’ undeclared (first use in this function)
  envp = getenv("LimitNOFILE");
  ^

This patch fixes it by declaring char *envp for this (second) case.

Signed-off-by: Ondřej Svoboda <ondrej svobodasoft cz>

diff --git a/multipathd/main.c b/multipathd/main.c
index 7c0e313..2d6aac8 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -1609,6 +1609,7 @@ child (void * param)
     struct multipath * mpp;
     int i;
     int rc, pid_rc;
+    char *envp;
     mlockall(MCL_CURRENT | MCL_FUTURE);
     sem_init(&exit_sem, 0, 0);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]