diff options
author | mlelstv <mlelstv@pkgsrc.org> | 2011-02-06 14:22:29 +0000 |
---|---|---|
committer | mlelstv <mlelstv@pkgsrc.org> | 2011-02-06 14:22:29 +0000 |
commit | 814497ffb6bfe54ba14912f18927b031b7d1947d (patch) | |
tree | f7c4b65538a87d162449b73ae0fa01e75fb26284 /net | |
parent | 6257e8a9afd557c126cbcdbc4db11c65d23e1ca6 (diff) | |
download | pkgsrc-814497ffb6bfe54ba14912f18927b031b7d1947d.tar.gz |
add autoconf test for new SIOCGIFCONF interface that uses a
ifru_space member to store larger addresses and parse interface list
accordingly.
Diffstat (limited to 'net')
-rw-r--r-- | net/libdnet/Makefile | 8 | ||||
-rw-r--r-- | net/libdnet/patches/patch-aa | 77 |
2 files changed, 83 insertions, 2 deletions
diff --git a/net/libdnet/Makefile b/net/libdnet/Makefile index a95a4050de0..5fc54d4bb42 100644 --- a/net/libdnet/Makefile +++ b/net/libdnet/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.16 2008/07/14 12:56:10 joerg Exp $ +# $NetBSD: Makefile,v 1.17 2011/02/06 14:22:29 mlelstv Exp $ # DISTNAME= libdnet-1.12 +PKGREVISION= 1 CATEGORIES= devel net MASTER_SITES= http://libdnet.googlecode.com/files/ EXTRACT_SUFX= .tgz @@ -13,11 +14,14 @@ COMMENT= C interface to several low-level networking routines PKG_DESTDIR_SUPPORT= user-destdir GNU_CONFIGURE= yes -USE_TOOLS+= gmake +USE_TOOLS+= autoconf gmake USE_LIBTOOL= yes BUILD_DEFS+= IPV6_READY +pre-configure: + cd ${WRKSRC} && autoconf -f + PKG_OPTIONS_VAR= PKG_OPTIONS.libdnet PKG_SUPPORTED_OPTIONS= libdnetcheck .include "../../mk/bsd.options.mk" diff --git a/net/libdnet/patches/patch-aa b/net/libdnet/patches/patch-aa new file mode 100644 index 00000000000..583c2aa2a43 --- /dev/null +++ b/net/libdnet/patches/patch-aa @@ -0,0 +1,77 @@ +--- configure.in.orig 2011-02-06 14:20:17.000000000 +0100 ++++ configure.in 2011-02-06 14:20:51.000000000 +0100 +@@ -186,6 +186,9 @@ + if test "$ac_cv_header_sys_socket_h" = yes ; then + AC_DNET_SOCKADDR_SA_LEN + fi ++if test "$ac_cv_header_net_if_h" = yes ; then ++ AC_DNET_IFREQ_IFR_SPACE ++fi + if test "$ac_cv_header_net_if_arp_h" = yes ; then + AC_DNET_ARPREQ_ARP_DEV + fi +--- aclocal.m4.orig 2011-02-06 14:02:01.000000000 +0100 ++++ aclocal.m4 2011-02-06 14:08:47.000000000 +0100 +@@ -6776,6 +6776,30 @@ + fi]) + + dnl ++dnl Check for NetBSD ifreq structure ++dnl ++dnl usage: AC_DNET_IFREQ_IFR_SPACE ++dnl results: HAVE_IFREQ_IFR_SPACE (defined) ++dnl ++AC_DEFUN(AC_DNET_IFREQ_IFR_SPACE, ++ [AC_MSG_CHECKING(for ifr_space in ifreq struct) ++ AC_CACHE_VAL(ac_cv_dnet_ifreq_has_ifr_space, ++ AC_TRY_COMPILE([ ++# ifndef _IFREQ_IFR_SPACE ++# define _IFREQ_IFR_SPACE 1 ++# endif ++# include <sys/types.h> ++# include <net/if.h>], ++ [u_int i = sizeof(((struct ifreq *)0)->ifr_space)], ++ ac_cv_dnet_ifreq_has_ifr_space=yes, ++ ac_cv_dnet_ifreq_has_ifr_space=no)) ++ AC_MSG_RESULT($ac_cv_dnet_ifreq_has_ifr_space) ++ if test $ac_cv_dnet_ifreq_has_ifr_space = yes ; then ++ AC_DEFINE(HAVE_IFREQ_IFR_SPACE, 1, ++ [Define if ifreq struct has ifr_space.]) ++ fi]) ++ ++dnl + dnl Check for sockaddr_in6 struct in <netinet/in.h> + dnl + dnl usage: AC_DNET_SOCKADDR_IN6 +--- include/config.h.in.orig 2011-02-06 14:54:20.000000000 +0100 ++++ include/config.h.in 2011-02-06 14:55:18.000000000 +0100 +@@ -142,6 +142,9 @@ + /* Define if sockaddr struct has sa_len. */ + #undef HAVE_SOCKADDR_SA_LEN + ++/* Define if ifreq struct has ifr_space. */ ++#undef HAVE_IFREQ_IFR_SPACE ++ + /* Define to 1 if you have the <stdint.h> header file. */ + #undef HAVE_STDINT_H + +--- src/intf.c.orig 2011-02-06 14:08:54.000000000 +0100 ++++ src/intf.c 2011-02-06 14:09:57.000000000 +0100 +@@ -55,6 +55,9 @@ + # define ifr_mtu ifr_metric + #endif + ++#ifdef HAVE_IFREQ_IFR_SPACE ++# define NEXTIFR(i) (i + 1) ++#else + #ifdef HAVE_SOCKADDR_SA_LEN + # define NEXTIFR(i) ((struct ifreq *)((u_char *)&i->ifr_addr + \ + (i->ifr_addr.sa_len ? i->ifr_addr.sa_len : \ +@@ -62,6 +65,7 @@ + #else + # define NEXTIFR(i) (i + 1) + #endif ++#endif + + /* XXX - superset of ifreq, for portable SIOC{A,D}IFADDR */ + struct dnet_ifaliasreq { |