diff options
author | delphij <delphij@FreeBSD.org> | 2009-07-29 13:58:49 +0800 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2009-07-29 13:58:49 +0800 |
commit | 5beb7aaca9d02effbdfaa15b85c5292821a375ce (patch) | |
tree | a7676cb6df0ccffef10f58c9fba418f00ed63c63 /net/ladvd | |
parent | 2e5c824e446f1b1c5fd04e5153d2e7eee0772541 (diff) | |
download | freebsd-ports-gnome-5beb7aaca9d02effbdfaa15b85c5292821a375ce.tar.gz freebsd-ports-gnome-5beb7aaca9d02effbdfaa15b85c5292821a375ce.tar.zst freebsd-ports-gnome-5beb7aaca9d02effbdfaa15b85c5292821a375ce.zip |
Fix build on amd64 (and, ideally, all other architectures we supported) by
backporting some upstream fixes. This also fixes some lagg ioctls.
Submitted by: maintainer
PR: ports/137195
Diffstat (limited to 'net/ladvd')
-rw-r--r-- | net/ladvd/Makefile | 4 | ||||
-rw-r--r-- | net/ladvd/files/patch-backport | 83 |
2 files changed, 85 insertions, 2 deletions
diff --git a/net/ladvd/Makefile b/net/ladvd/Makefile index 4949557c3cc7..8371b2c5b9d8 100644 --- a/net/ladvd/Makefile +++ b/net/ladvd/Makefile @@ -7,6 +7,7 @@ PORTNAME= ladvd PORTVERSION= 0.8 +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= http://blinkenlights.nl/software/ladvd/ @@ -15,9 +16,8 @@ COMMENT= A minimal CDP/LLDP sender LIB_DEPENDS= event-1.4:${PORTSDIR}/devel/libevent -ONLY_FOR_ARCHS= i386 - GNU_CONFIGURE= yes +CONFIGURE_ARGS= --with-chroot-dir=/var/empty PORTDOCS= * MAN8= ladvd.8 diff --git a/net/ladvd/files/patch-backport b/net/ladvd/files/patch-backport new file mode 100644 index 000000000000..84290b8194c4 --- /dev/null +++ b/net/ladvd/files/patch-backport @@ -0,0 +1,83 @@ +--- ./src/netif.c.orig 2009-06-21 12:36:07.000000000 -0700 ++++ ./src/netif.c 2009-07-28 19:03:00.229811057 -0700 +@@ -399,6 +399,12 @@ + memset(&drvinfo, 0, sizeof(drvinfo)); + #endif + ++#ifdef HAVE_NET_IF_LAGG_H ++ struct lagg_reqall ra; ++#elif HAVE_NET_IF_TRUNK_H ++ struct trunk_reqall ra; ++#endif ++ + #ifdef HAVE_SYSFS + if (snprintf(path, SYSFS_PATH_MAX, + SYSFS_CLASS_NET "/%s/device", ifaddr->ifa_name) > 0) { +@@ -442,13 +448,17 @@ + if (if_data->ifi_type == IFT_ETHER) { + + // bonding ++#if defined(HAVE_NET_IF_LAGG_H) || defined(HAVE_NET_IF_TRUNK_H) ++ memset(&ra, 0, sizeof(ra)); ++ strlcpy(ra.ra_ifname, ifaddr->ifa_name, sizeof(ra.ra_ifname)); + #ifdef HAVE_NET_IF_LAGG_H +- if (ioctl(sockfd, SIOCGLAGG, (caddr_t)ifr) >= 0) ++ if (ioctl(sockfd, SIOCGLAGG, &ra) >= 0) + return(NETIF_BONDING); + #elif HAVE_NET_IF_TRUNK_H +- if (ioctl(sockfd, SIOCGTRUNK, (caddr_t)ifr) == 0) ++ if (ioctl(sockfd, SIOCGTRUNK, &ra) == 0) + return(NETIF_BONDING); + #endif ++#endif + + // accept regular devices + return(NETIF_REGULAR); +@@ -459,8 +469,9 @@ + return(NETIF_BRIDGE); + #endif + #ifdef IFT_IEEE8023ADLAG ++ // trunk ports have a special type + } else if (if_data->ifi_type == IFT_IEEE8023ADLAG) { +- return(NETIF_BONDING); ++ return(NETIF_REGULAR); + #endif + } + +@@ -548,7 +559,7 @@ + my_log(INFO, "found slave %s", subif->name); + subif->slave = 1; + subif->master = master; +- subif->lacp_index = i++; ++ subif->lacp_index = i; + csubif->subif = subif; + csubif = subif; + } +--- ./configure.orig 2009-06-21 12:44:00.000000000 -0700 ++++ ./configure 2009-07-28 19:04:14.275354033 -0700 +@@ -20062,15 +20062,12 @@ + + ;; + freebsd*) +- case "$target" in +- x86_64-*-freebsd7.*) +- use_pie=no +- esac + + cat >>confdefs.h <<\_ACEOF + #define TARGET_IS_FREEBSD 1 + _ACEOF + ++ use_pie=no + ;; + openbsd*) + +@@ -20479,7 +20476,7 @@ + { echo "$as_me:$LINENO: result: $ssp_cv_cc" >&5 + echo "${ECHO_T}$ssp_cv_cc" >&6; } + if test $ssp_cv_cc = yes; then +- WFLAGS="$WFLAGS -fstack-protector" ++ WCFLAGS="$WCFLAGS -fstack-protector" + + cat >>confdefs.h <<\_ACEOF + #define ENABLE_SSP_CC 1 |