]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0269: configure: Link error on Solaris v9.2.0269
authorChristian Brabandt <cb@256bit.org>
Sun, 29 Mar 2026 14:00:51 +0000 (14:00 +0000)
committerChristian Brabandt <cb@256bit.org>
Sun, 29 Mar 2026 14:00:51 +0000 (14:00 +0000)
Problem:  configure: Link error on Solaris
          (idgn23, after v9.2.0153)
Solution: Move the check for the nsl library a bit earlier,
          regenerate configure

fixes: #19803

Signed-off-by: Christian Brabandt <cb@256bit.org>
src/auto/configure
src/configure.ac
src/version.c

index 93ee5ea6524af333780f9d87eeb0cdfcdfb70d2a..8e73d97b1e86d22090b73e49f8a7428d5f5afb52 100755 (executable)
@@ -8820,6 +8820,57 @@ then :
 
   LIBS="-lsocket $LIBS"
 
+fi
+
+               { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
+printf %s "checking for gethostbyname in -lnsl... " >&6; }
+if test ${ac_cv_lib_nsl_gethostbyname+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e) ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnsl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.
+   The 'extern "C"' is for builds by C++ compilers;
+   although this is not generally supported in C code supporting it here
+   has little cost and some practical benefit (sr 110532).  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gethostbyname (void);
+int
+main (void)
+{
+return gethostbyname ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  ac_cv_lib_nsl_gethostbyname=yes
+else case e in #(
+  e) ac_cv_lib_nsl_gethostbyname=no ;;
+esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
+printf "%s\n" "$ac_cv_lib_nsl_gethostbyname" >&6; }
+if test "x$ac_cv_lib_nsl_gethostbyname" = xyes
+then :
+  printf "%s\n" "#define HAVE_LIBNSL 1" >>confdefs.h
+
+  LIBS="-lnsl $LIBS"
+
 fi
 
   fi
@@ -8891,57 +8942,6 @@ then :
 fi
 
   else
-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
-printf %s "checking for gethostbyname in -lnsl... " >&6; }
-if test ${ac_cv_lib_nsl_gethostbyname+y}
-then :
-  printf %s "(cached) " >&6
-else case e in #(
-  e) ac_check_lib_save_LIBS=$LIBS
-LIBS="-lnsl  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.
-   The 'extern "C"' is for builds by C++ compilers;
-   although this is not generally supported in C code supporting it here
-   has little cost and some practical benefit (sr 110532).  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gethostbyname (void);
-int
-main (void)
-{
-return gethostbyname ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
-then :
-  ac_cv_lib_nsl_gethostbyname=yes
-else case e in #(
-  e) ac_cv_lib_nsl_gethostbyname=no ;;
-esac
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
-printf "%s\n" "$ac_cv_lib_nsl_gethostbyname" >&6; }
-if test "x$ac_cv_lib_nsl_gethostbyname" = xyes
-then :
-  printf "%s\n" "#define HAVE_LIBNSL 1" >>confdefs.h
-
-  LIBS="-lnsl $LIBS"
-
-fi
-
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether compiling with IPv4 networking is possible" >&5
 printf %s "checking whether compiling with IPv4 networking is possible... " >&6; }
 if test ${vim_cv_ipv4_networking+y}
index 495c8de404eae86e30641889254e9f77e447cebf..3787701e3b1596c0a8052889a899b84f14f6daec 100644 (file)
@@ -2238,6 +2238,8 @@ if test "$enable_channel" = "yes"; then
        AC_CHECK_LIB(network, socket)
   else
        AC_CHECK_LIB(socket, socket)
+       dnl On Solaris we need the nsl library.
+       AC_CHECK_LIB(nsl, gethostbyname)
   fi
 
   AC_CACHE_CHECK([whether compiling with IPv6 networking is possible], [vim_cv_ipv6_networking],
@@ -2274,8 +2276,6 @@ if test "$enable_channel" = "yes"; then
     AC_DEFINE(FEAT_IPV6)
     AC_CHECK_FUNCS(inet_ntop)
   else
-    dnl On Solaris we need the nsl library.
-    AC_CHECK_LIB(nsl, gethostbyname)
     AC_CACHE_CHECK([whether compiling with IPv4 networking is possible], [vim_cv_ipv4_networking],
       [AC_LINK_IFELSE([AC_LANG_PROGRAM([
 #include <stdio.h>
index 82172b749958ab965ba51a02437f6a31ee620e2f..50844e28d8aa6078bafe5a759536a19e64f8d300 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    269,
 /**/
     268,
 /**/