1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-21 04:06:46 +00:00

Fix functionality on FreeBSD 11 and above

- Bump PORTREVISION for package change

PR:		216308 [1], 217093 [2]
Submitted by:	<ganbold-freebsd@ateamsystems.com> [1], Eugene Grosbein <ports@grosbein.net> [2]
This commit is contained in:
Sunpoet Po-Chuan Hsieh 2017-02-14 14:32:47 +00:00
parent ac64959bf2
commit 607697382c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=434089
6 changed files with 39 additions and 16 deletions

View File

@ -3,7 +3,7 @@
PORTNAME= libnet
PORTVERSION= 1.1.6
PORTREVISION= 4
PORTREVISION= 5
PORTEPOCH= 1
CATEGORIES= net
MASTER_SITES= SF/libnet-dev
@ -46,4 +46,10 @@ post-install-EXAMPLES-on:
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/
${INSTALL_DATA} ${WRKSRC}/sample/*.c ${STAGEDIR}${EXAMPLESDIR}/
.include <bsd.port.mk>
.include <bsd.port.pre.mk>
.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1100030
EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-configure
.endif
.include <bsd.port.post.mk>

View File

@ -0,0 +1,17 @@
--- configure.orig 2012-03-29 21:18:48 UTC
+++ configure
@@ -12165,13 +12165,12 @@ done
$as_echo "#define LIBNET_BSDISH_OS 1" >>confdefs.h
-$as_echo "#define LIBNET_BSD_BYTE_SWAP 1" >>confdefs.h
$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
- LIBNET_CONFIG_DEFINES="-DLIBNET_BSDISH_OS -DLIBNET_BSD_BYTE_SWAP -DHAVE_SOCKADDR_SA_LEN"
+ LIBNET_CONFIG_DEFINES="-DLIBNET_BSDISH_OS -DHAVE_SOCKADDR_SA_LEN"
;;
*netbsd*)

View File

@ -1,6 +1,6 @@
--- include/libnet.h.in.orig 2012-03-06 01:45:46.000000000 +0100
--- include/libnet.h.in.orig 2012-03-06 00:45:46 UTC
+++ include/libnet.h.in
@@ -81,6 +81,9 @@
@@ -81,6 +81,9 @@ extern "C" {
#if !defined(__WIN32__)
# include <sys/socket.h>
# include <net/if.h>

View File

@ -2,9 +2,9 @@
Obtained from: https://github.com/sam-github/libnet/commit/c9390bf8f3379c280ba8ceec67fbd8e908675d96
--- src/libnet_cq.c.orig 2012-03-20 00:59:50.000000000 +0800
+++ src/libnet_cq.c 2015-01-18 03:09:08.170403000 +0800
@@ -344,6 +344,8 @@
--- src/libnet_cq.c.orig 2012-03-19 16:59:50 UTC
+++ src/libnet_cq.c
@@ -344,6 +344,8 @@ libnet_cq_destroy()
libnet_destroy(tmp->context);
free(tmp);
}

View File

@ -4,9 +4,9 @@
Obtained from: https://github.com/sam-github/libnet/commit/18cbe497dd84afc471a5320e4ef3a7cde87c2c4e [1]
https://github.com/sam-github/libnet/commit/2e724b2f5cd614d7362f8dcbc57dc1fca6e437b3 [2]
--- src/libnet_if_addr.c.orig 2012-03-20 00:59:50.000000000 +0800
+++ src/libnet_if_addr.c 2015-01-18 03:09:08.169400000 +0800
@@ -330,6 +330,8 @@
--- src/libnet_if_addr.c.orig 2012-03-19 16:59:50 UTC
+++ src/libnet_if_addr.c
@@ -330,6 +330,8 @@ register char *errbuf)
++nipaddr;
}
@ -15,7 +15,7 @@ Obtained from: https://github.com/sam-github/libnet/commit/18cbe497dd84afc471a53
*ipaddrp = ifaddrlist;
return (nipaddr);
}
@@ -339,7 +341,6 @@
@@ -339,7 +341,6 @@ int
libnet_select_device(libnet_t *l)
{
int c, i;
@ -23,7 +23,7 @@ Obtained from: https://github.com/sam-github/libnet/commit/18cbe497dd84afc471a53
struct libnet_ifaddr_list *address_list, *al;
uint32_t addr;
@@ -364,7 +365,7 @@
@@ -364,7 +365,7 @@ libnet_select_device(libnet_t *l)
/*
* Number of interfaces.
*/

View File

@ -2,9 +2,9 @@
Obtained from: https://github.com/sam-github/libnet/commit/408fa2266a4af402152cc0f1e9a40b56477b995a
--- src/libnet_link_bpf.c.orig 2012-03-20 00:59:50.000000000 +0800
+++ src/libnet_link_bpf.c 2015-01-18 03:09:08.169400000 +0800
@@ -316,7 +316,11 @@
--- src/libnet_link_bpf.c.orig 2012-03-19 16:59:50 UTC
+++ src/libnet_link_bpf.c
@@ -316,7 +316,11 @@ libnet_get_hwaddr(libnet_t *l)
if (ifm->ifm_type == RTM_IFINFO)
{
sdl = (struct sockaddr_dl *)(ifm + 1);
@ -17,7 +17,7 @@ Obtained from: https://github.com/sam-github/libnet/commit/408fa2266a4af402152cc
continue;
if (strncmp(&sdl->sdl_data[0], l->device, sdl->sdl_nlen) == 0)
{
@@ -326,6 +330,12 @@
@@ -326,6 +330,12 @@ libnet_get_hwaddr(libnet_t *l)
}
}
free(buf);