Ignore:
Timestamp:
Aug 2, 2010, 6:40:21 PM (15 years ago)
Author:
Silvan Scherrer
Message:

Samba 3.5: vendor update to 3.5.4

Location:
vendor/current/lib/replace
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/lib/replace/libreplace_network.m4

    r414 r478  
    351351fi
    352352
     353dnl Some old Linux systems have broken header files and
     354dnl miss the IPV6_V6ONLY define in netinet/in.h,
     355dnl but have it in linux/in6.h.
     356dnl We can't include both files so we just check if the value
     357dnl if defined and do the replacement in system/network.h
     358AC_CACHE_CHECK([for IPV6_V6ONLY support],libreplace_cv_HAVE_IPV6_V6ONLY,[
     359        AC_TRY_COMPILE([
     360#include <stdlib.h> /* for NULL */
     361#include <sys/socket.h>
     362#include <sys/types.h>
     363#include <netdb.h>
     364#include <netinet/in.h>
     365                ],
     366                [
     367#ifndef IPV6_V6ONLY
     368#error no IPV6_V6ONLY
     369#endif
     370                ],[
     371                libreplace_cv_HAVE_IPV6_V6ONLY=yes
     372                ],[
     373                libreplace_cv_HAVE_IPV6_V6ONLY=no
     374                ])
     375])
     376if test x"$libreplace_cv_HAVE_IPV6_V6ONLY" != x"yes"; then
     377   dnl test for IPV6_V6ONLY
     378   AC_CACHE_CHECK([for IPV6_V6ONLY in linux/in6.h],libreplace_cv_HAVE_LINUX_IPV6_V6ONLY_26,[
     379        AC_TRY_COMPILE([
     380        #include <linux/in6.h>
     381                ],
     382                [
     383        #if (IPV6_V6ONLY != 26)
     384        #error no linux IPV6_V6ONLY
     385        #endif
     386                ],[
     387                libreplace_cv_HAVE_LINUX_IPV6_V6ONLY_26=yes
     388                ],[
     389                libreplace_cv_HAVE_LINUX_IPV6_V6ONLY_26=no
     390                ])
     391        ])
     392        if test x"$libreplace_cv_HAVE_LINUX_IPV6_V6ONLY_26" = x"yes"; then
     393                AC_DEFINE(HAVE_LINUX_IPV6_V6ONLY_26,1,[Whether the system has IPV6_V6ONLY in linux/in6.h])
     394        fi
     395fi
     396
    353397dnl test for ipv6
    354398AC_CACHE_CHECK([for ipv6 support],libreplace_cv_HAVE_IPV6,[
     
    371415}
    372416freeaddrinfo(ai);
     417{
     418        int val = 1;
     419        #ifdef HAVE_LINUX_IPV6_V6ONLY_26
     420        #define IPV6_V6ONLY 26
     421        #endif
     422        ret = setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY,
     423                         (const void *)&val, sizeof(val));
     424}
    373425                ],[
    374426                libreplace_cv_HAVE_IPV6=yes
  • vendor/current/lib/replace/system/network.h

    r414 r478  
    361361#endif
    362362
     363/* Some old Linux systems have broken header files */
     364#ifdef HAVE_IPV6
     365#ifdef HAVE_LINUX_IPV6_V6ONLY_26
     366#define IPV6_V6ONLY 26
     367#endif /* HAVE_LINUX_IPV6_V6ONLY_26 */
     368#endif /* HAVE_IPV6 */
     369
    363370#ifdef SOCKET_WRAPPER
    364371#ifndef SOCKET_WRAPPER_DISABLE
Note: See TracChangeset for help on using the changeset viewer.