linux-tools (3.2.17-1) usbip-fix-explicit-configure-with-tcp-wrappers.patch

Summary

 drivers/staging/usbip/userspace/configure.ac |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

    
download this patch

Patch contents

From: Ben Hutchings <ben@decadent.org.uk>
Subject: usbip: Fix explicit configure --with-tcp-wrappers

If the --with-tcp-wrappers[=yes] option is given and the wrap library
checks out, we currently add '-lwrap' to $LIBS but then reset it to
$saved_LIBS.  In fact there is no need to save and restore $LIBS here
because failure is fatal.  $wrap_LIB is also unused, so don't set that
either.

--- a/drivers/staging/usbip/userspace/configure.ac
+++ b/drivers/staging/usbip/userspace/configure.ac
@@ -56,8 +56,7 @@
 	    [AS_HELP_STRING([--with-tcp-wrappers],
 			    [use the libwrap (TCP wrappers) library])],
 	    dnl [ACTION-IF-GIVEN]
-	    [saved_LIBS="$LIBS"
-	     if test "$withval" = "yes"; then
+	    [if test "$withval" = "yes"; then
 		     AC_MSG_RESULT([yes])
 		     AC_MSG_CHECKING([for hosts_access in -lwrap])
 		     LIBS="-lwrap $LIBS"
@@ -65,13 +64,11 @@
 		       [int hosts_access(); int allow_severity, deny_severity;],
 		       [hosts_access()],
 		       [AC_MSG_RESULT([yes]);
-			AC_DEFINE([HAVE_LIBWRAP], [1],
-				  [use tcp wrapper]) wrap_LIB="-lwrap"],
+			AC_DEFINE([HAVE_LIBWRAP], [1], [use tcp wrapper])],
 		       [AC_MSG_RESULT([not found]); exit 1])
 	     else
 		     AC_MSG_RESULT([no])
-	     fi
-	     LIBS="$saved_LIBS"],
+	     fi],
 	    dnl [ACTION-IF-NOT-GIVEN]
 	    [AC_MSG_RESULT([(default)])
 	     AC_MSG_CHECKING([for hosts_access in -lwrap])