Skip to contentSkip to conversation

multipathd: Fix for 'Read environment variables from systemd'

PATCH In review Ondřej Svoboda 1 participant 2 messages Dec 10, 2013 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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>
multipathd/main.c +1 -0
index 7c0e313..2d6aac8 100644
@@ -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);

--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel

#1 lore raw

Never mind, it’s too late for me.

Quoted 23 lines · Ondřej Svoboda

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>
multipathd/main.c +1 -0
index 7c0e313..2d6aac8 100644
@@ -1609,6 +1609,7 @@ child (void * param)
     struct multipath * mpp;
     int i;
     int rc, pid_rc;
+    char *envp;
 
 
     mlockall(MCL_CURRENT | MCL_FUTURE);
Quoted 6 lines
     sem_init(&exit_sem, 0, 0);
Signature · 3 lines
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel

--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel