From: Matthew L. Creech Date: Wed, 11 May 2011 21:57:28 +0000 (-0400) Subject: Fix 2.2.0 build failure when management interface disabled X-Git-Tag: v2.2.1~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e1f2f5f61e5be20be9abd9c747fa83e8189d34c8;p=thirdparty%2Fopenvpn.git Fix 2.2.0 build failure when management interface disabled I just upgraded to 2.2.0, and my build fails with: ps.c: In function 'port_share_open': ps.c:778:7: error: 'management' undeclared (first use in this function) ps.c:778:7: note: each undeclared identifier is reported only once for each function it appears in make[5]: *** [ps.o] Error 1 [Comment by David Sommerseth: This happens only when building with --enable-small, --disable-management and --disable-pkcs11 Also changed MANAGEMENT_ENABLED to ENABLE_MANAGEMENT from the original patch. ] Mailing-list: http://thread.gmane.org/gmane.network.openvpn.devel/4639 Signed-off-by: Matthew L. Creech Acked-by: Gert Doering Signed-off-by: David Sommerseth (cherry picked from commit ca0ed8458a355aea46d26c209984caaf533784ec) --- diff --git a/ps.c b/ps.c index ef48e367e..5533341c4 100644 --- a/ps.c +++ b/ps.c @@ -774,8 +774,10 @@ port_share_open (const char *host, const int port) /* Let msg know that we forked */ msg_forked (); +#ifdef ENABLE_MANAGEMENT /* Don't interact with management interface */ management = NULL; +#endif /* close all parent fds except our socket back to parent */ close_fds_except (fd[1]);