commit:     c4c854fbd41c4edb6f512222f52e26b53355957e
Author:     Jory Pratt <anarchy <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 25 01:44:48 2019 +0000
Commit:     Jory Pratt <anarchy <AT> gentoo <DOT> org>
CommitDate: Thu Jul 25 01:44:48 2019 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=c4c854fb

net-misc/rsync: update ipv6 patch

Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Jory Pratt <anarchy <AT> gentoo.org>

 net-misc/rsync/files/rsync-fix-musl-ipv6.patch | 472 +------------------------
 1 file changed, 17 insertions(+), 455 deletions(-)

diff --git a/net-misc/rsync/files/rsync-fix-musl-ipv6.patch 
b/net-misc/rsync/files/rsync-fix-musl-ipv6.patch
index 53d7381..ca692b5 100644
--- a/net-misc/rsync/files/rsync-fix-musl-ipv6.patch
+++ b/net-misc/rsync/files/rsync-fix-musl-ipv6.patch
@@ -1,25 +1,27 @@
-From 78621d2d5e12c9e7c54ab0a15bb90495d7927251 Mon Sep 17 00:00:00 2001
+From 811db086507aceaec0022798dd418956cdd4b54e Mon Sep 17 00:00:00 2001
 From: Pierre-Olivier Mercier <[email protected]>
-Date: Wed, 8 Mar 2017 12:44:11 +0100
-Subject: [PATCH] musl compatibility
+Date: Mon, 4 Sep 2017 22:29:55 +0200
+Subject: [PATCH] Test IPv6 compatibility instead of relying on library probes.
 
+Legacy configure behaviour was to detect IPv6 support through known IPv6
+capable version of common standard libraries. Now: it runs a POSIX test
+to determine if IPv6 is usable (in case it has not been disabled).
 ---
- configure.ac | 138 +++++-------------------
- configure.sh | 348 +++++++++++++----------------------------------------------
- 2 files changed, 102 insertions(+), 384 deletions(-)
+ configure.ac | 138 ++++++++++++-----------------------------------------------
+ 1 file changed, 28 insertions(+), 110 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
-index 1b32dfb..891f7b9 100644
+index e01e124b..b5db8515 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -204,119 +204,37 @@ if test x"$rsync_cv_HAVE_BROKEN_LARGEFILE" != x"yes"; 
then
     AC_SYS_LARGEFILE
  fi
-
+ 
 -ipv6type=unknown
 -ipv6lib=none
 -ipv6trylibc=yes
-
+ 
 +# Checks if IPv6 is requested
 +AC_MSG_CHECKING([whether to enable ipv6])
  AC_ARG_ENABLE(ipv6,
@@ -137,17 +139,17 @@ index 1b32dfb..891f7b9 100644
 +        AC_DEFINE(INET6, 1, [true if you have IPv6])
 +      ;;
 +  esac ],
-
+ 
 -      AC_SEARCH_LIBS(getaddrinfo, inet6)
 -fi
 +  AC_TRY_RUN([ /* AF_INET6 avalable check */
++#include <stdlib.h>
 +#include <sys/types.h>
 +#include <sys/socket.h>
 +main()
 +{
-+  exit(0);
 +   if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
-+      exit(1);
++     exit(1);
 +   else
 +     exit(0);
 +}
@@ -157,449 +159,9 @@ index 1b32dfb..891f7b9 100644
 +  AC_MSG_RESULT(no),
 +  AC_MSG_RESULT(no)
 +))
-
+ 
  dnl Do you want to disable use of locale functions
  AC_ARG_ENABLE([locale],
-diff --git a/configure.sh b/configure.sh
-index d6e9c8d..cfaaa99 100755
---- a/configure.sh
-+++ b/configure.sh
-@@ -1349,7 +1349,7 @@ Optional Features:
-   --enable-maintainer-mode
-                           turn on extra debug features
-   --disable-largefile     omit support for large files
--  --disable-ipv6          do not even try to use IPv6
-+  --disable-ipv6          disable ipv6 support
-   --disable-locale        disable locale features
-   --disable-iconv-open    disable all use of iconv_open() function
-   --disable-iconv         disable rsync's --iconv option
-@@ -1577,6 +1577,37 @@ fi
-
- } # ac_fn_c_try_run
-
-+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
-+# -------------------------------------------------------
-+# Tests whether HEADER exists and can be compiled using the include files in
-+# INCLUDES, setting the cache variable VAR accordingly.
-+ac_fn_c_check_header_compile ()
-+{
-+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-+$as_echo_n "checking for $2... " >&6; }
-+if eval \${$3+:} false; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+$4
-+#include <$2>
-+_ACEOF
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  eval "$3=yes"
-+else
-+  eval "$3=no"
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+fi
-+eval ac_res=\$$3
-+             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-+$as_echo "$ac_res" >&6; }
-+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-+
-+} # ac_fn_c_check_header_compile
-+
- # ac_fn_c_try_link LINENO
- # -----------------------
- # Try to link conftest.$ac_ext, and return whether this succeeded.
-@@ -1623,37 +1654,6 @@ fi
-
- } # ac_fn_c_try_link
-
--# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
--# -------------------------------------------------------
--# Tests whether HEADER exists and can be compiled using the include files in
--# INCLUDES, setting the cache variable VAR accordingly.
--ac_fn_c_check_header_compile ()
--{
--  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
--  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
--$as_echo_n "checking for $2... " >&6; }
--if eval \${$3+:} false; then :
--  $as_echo_n "(cached) " >&6
--else
--  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h.  */
--$4
--#include <$2>
--_ACEOF
--if ac_fn_c_try_compile "$LINENO"; then :
--  eval "$3=yes"
--else
--  eval "$3=no"
--fi
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
--eval ac_res=\$$3
--             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
--$as_echo "$ac_res" >&6; }
--  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
--
--} # ac_fn_c_check_header_compile
--
- # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
- # -------------------------------------------------------
- # Tests whether HEADER exists, giving a warning if it cannot be compiled using
-@@ -4548,7 +4548,7 @@ else
-     We can't simply define LARGE_OFF_T to be 9223372036854775807,
-     since some C++ compilers masquerading as C compilers
-     incorrectly reject 9223372036854775807.  */
--#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 
31))
-+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
-   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-                      && LARGE_OFF_T % 2147483647 == 1)
-                     ? 1 : -1];
-@@ -4594,7 +4594,7 @@ else
-     We can't simply define LARGE_OFF_T to be 9223372036854775807,
-     since some C++ compilers masquerading as C compilers
-     incorrectly reject 9223372036854775807.  */
--#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 
31))
-+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
-   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-                      && LARGE_OFF_T % 2147483647 == 1)
-                     ? 1 : -1];
-@@ -4618,7 +4618,7 @@ rm -f core conftest.err conftest.$ac_objext 
conftest.$ac_ext
-     We can't simply define LARGE_OFF_T to be 9223372036854775807,
-     since some C++ compilers masquerading as C compilers
-     incorrectly reject 9223372036854775807.  */
--#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 
31))
-+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
-   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-                      && LARGE_OFF_T % 2147483647 == 1)
-                     ? 1 : -1];
-@@ -4663,7 +4663,7 @@ else
-     We can't simply define LARGE_OFF_T to be 9223372036854775807,
-     since some C++ compilers masquerading as C compilers
-     incorrectly reject 9223372036854775807.  */
--#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 
31))
-+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
-   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-                      && LARGE_OFF_T % 2147483647 == 1)
-                     ? 1 : -1];
-@@ -4687,7 +4687,7 @@ rm -f core conftest.err conftest.$ac_objext 
conftest.$ac_ext
-     We can't simply define LARGE_OFF_T to be 9223372036854775807,
-     since some C++ compilers masquerading as C compilers
-     incorrectly reject 9223372036854775807.  */
--#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 
31))
-+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
-   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-                      && LARGE_OFF_T % 2147483647 == 1)
-                     ? 1 : -1];
-@@ -4725,262 +4725,61 @@ fi
-
- fi
-
--ipv6type=unknown
--ipv6lib=none
--ipv6trylibc=yes
-
-+# Checks if IPv6 is requested
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable ipv6" >&5
-+$as_echo_n "checking whether to enable ipv6... " >&6; }
- # Check whether --enable-ipv6 was given.
- if test "${enable_ipv6+set}" = set; then :
--  enableval=$enable_ipv6;
--fi
--
--if test x"$enable_ipv6" != x"no"; then
--      { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
--$as_echo_n "checking ipv6 stack type... " >&6; }
--      for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta 
cygwin; do
--              case $i in
--              inria)
--                      # http://www.kame.net/
--
--cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h.  */
--
--#include <netinet/in.h>
--#ifdef IPV6_INRIA_VERSION
--yes
--#endif
--_ACEOF
--if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
--  $EGREP "yes" >/dev/null 2>&1; then :
--  ipv6type=$i;
--
--$as_echo "#define INET6 1" >>confdefs.h
--
--
--fi
--rm -f conftest*
--
--                      ;;
--              kame)
--                      # http://www.kame.net/
--                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h.  */
--
--#include <netinet/in.h>
--#ifdef __KAME__
--yes
--#endif
--_ACEOF
--if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
--  $EGREP "yes" >/dev/null 2>&1; then :
--  ipv6type=$i;
--
--$as_echo "#define INET6 1" >>confdefs.h
--
--fi
--rm -f conftest*
--
--                      ;;
--              linux-glibc)
--                      # http://www.v6.linux.or.jp/
--                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h.  */
--
--#include <features.h>
--#if defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
--yes
--#endif
--_ACEOF
--if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
--  $EGREP "yes" >/dev/null 2>&1; then :
--  ipv6type=$i;
--
--$as_echo "#define INET6 1" >>confdefs.h
--
--fi
--rm -f conftest*
--
--                      ;;
--              linux-inet6)
--                      # http://www.v6.linux.or.jp/
--                      if test -d /usr/inet6 -o -f /usr/inet6/lib/libinet6.a; 
then
--                              ipv6type=$i
--                              ipv6lib=inet6
--                              ipv6libdir=/usr/inet6/lib
--                              ipv6trylibc=yes;
--
--$as_echo "#define INET6 1" >>confdefs.h
--
--                              CFLAGS="-I/usr/inet6/include $CFLAGS"
--                      fi
--                      ;;
--              solaris)
--                      # http://www.sun.com
--                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h.  */
--
--#include <netinet/ip6.h>
--#ifdef __sun
--yes
--#endif
--_ACEOF
--if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
--  $EGREP "yes" >/dev/null 2>&1; then :
--  ipv6type=$i;
--
--$as_echo "#define INET6 1" >>confdefs.h
--
--fi
--rm -f conftest*
--
--                      ;;
--              toshiba)
--                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h.  */
--
--#include <sys/param.h>
--#ifdef _TOSHIBA_INET6
--yes
--#endif
--_ACEOF
--if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
--  $EGREP "yes" >/dev/null 2>&1; then :
--  ipv6type=$i;
--                              ipv6lib=inet6;
--                              ipv6libdir=/usr/local/v6/lib;
--
--$as_echo "#define INET6 1" >>confdefs.h
--
--fi
--rm -f conftest*
--
--                      ;;
--              v6d)
--                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h.  */
--
--#include </usr/local/v6/include/sys/v6config.h>
--#ifdef __V6D__
--yes
--#endif
--_ACEOF
--if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
--  $EGREP "yes" >/dev/null 2>&1; then :
--  ipv6type=$i;
--                              ipv6lib=v6;
--                              ipv6libdir=/usr/local/v6/lib;
--
--$as_echo "#define INET6 1" >>confdefs.h
--
--fi
--rm -f conftest*
--
--                      ;;
--              zeta)
--                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h.  */
--
--#include <sys/param.h>
--#ifdef _ZETA_MINAMI_INET6
--yes
--#endif
--_ACEOF
--if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
--  $EGREP "yes" >/dev/null 2>&1; then :
--  ipv6type=$i;
--                              ipv6lib=inet6;
--                              ipv6libdir=/usr/local/v6/lib;
--
--$as_echo "#define INET6 1" >>confdefs.h
--
--fi
--rm -f conftest*
--
--                      ;;
--              cygwin)
--                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h.  */
--
--#include <netinet/in.h>
--#ifdef _CYGWIN_IN6_H
--yes
--#endif
--_ACEOF
--if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
--  $EGREP "yes" >/dev/null 2>&1; then :
--  ipv6type=$i;
-+  enableval=$enable_ipv6;  case "$enableval" in
-+  no)
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+      ;;
-+  *)    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }
-
- $as_echo "#define INET6 1" >>confdefs.h
-
--fi
--rm -f conftest*
-+      ;;
-+  esac
-+else
-+  if test "$cross_compiling" = yes; then :
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-
--                      ;;
--              esac
--              if test "$ipv6type" != "unknown"; then
--                      break
--              fi
--      done
--      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
--$as_echo "$ipv6type" >&6; }
--
--      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library 
containing getaddrinfo" >&5
--$as_echo_n "checking for library containing getaddrinfo... " >&6; }
--if ${ac_cv_search_getaddrinfo+:} false; then :
--  $as_echo_n "(cached) " >&6
- else
--  ac_func_search_save_LIBS=$LIBS
--cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+  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.  */
--#ifdef __cplusplus
--extern "C"
--#endif
--char getaddrinfo ();
--int
--main ()
-+ /* AF_INET6 avalable check */
-+#include <sys/types.h>
-+#include <sys/socket.h>
-+main()
- {
--return getaddrinfo ();
--  ;
--  return 0;
-+  exit(0);
-+   if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
-+      exit(1);
-+   else
-+     exit(0);
- }
-+
- _ACEOF
--for ac_lib in '' inet6; do
--  if test -z "$ac_lib"; then
--    ac_res="none required"
--  else
--    ac_res=-l$ac_lib
--    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
--  fi
--  if ac_fn_c_try_link "$LINENO"; then :
--  ac_cv_search_getaddrinfo=$ac_res
--fi
--rm -f core conftest.err conftest.$ac_objext \
--    conftest$ac_exeext
--  if ${ac_cv_search_getaddrinfo+:} false; then :
--  break
--fi
--done
--if ${ac_cv_search_getaddrinfo+:} false; then :
-+if ac_fn_c_try_run "$LINENO"; then :
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }
-+
-+$as_echo "#define INET6 1" >>confdefs.h
-
- else
--  ac_cv_search_getaddrinfo=no
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
- fi
--rm conftest.$ac_ext
--LIBS=$ac_func_search_save_LIBS
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
- fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getaddrinfo" 
>&5
--$as_echo "$ac_cv_search_getaddrinfo" >&6; }
--ac_res=$ac_cv_search_getaddrinfo
--if test "$ac_res" != no; then :
--  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
- fi
-
--fi
-
- # Check whether --enable-locale was given.
- if test "${enable_locale+set}" = set; then :
-@@ -5006,6 +4805,7 @@ $as_echo "#define SHUTDOWN_ALL_SOCKETS 1" >>confdefs.h
- $as_echo "no" >&6; };;
- esac
+-- 
+2.13.0
 
-+
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
- $as_echo_n "checking for ANSI C header files... " >&6; }
- if ${ac_cv_header_stdc+:} false; then :
---
-2.10.2

Reply via email to