git: 4ca9ea9d4060 - main - net/realtek-re-kmod: fix build on FreeBSD 15.

From: Alex Dupre <ale_at_FreeBSD.org>
Date: Thu, 28 Nov 2024 09:15:59 UTC
The branch main has been updated by ale:

URL: https://cgit.FreeBSD.org/ports/commit/?id=4ca9ea9d4060a4a494456a0e56306bd508fe20e8

commit 4ca9ea9d4060a4a494456a0e56306bd508fe20e8
Author:     Alex Dupre <ale@FreeBSD.org>
AuthorDate: 2024-11-28 09:10:44 +0000
Commit:     Alex Dupre <ale@FreeBSD.org>
CommitDate: 2024-11-28 09:10:44 +0000

    net/realtek-re-kmod: fix build on FreeBSD 15.
    
    I've opted for the simplest patch, the inclusion of if_private.h,
    instead of a more invasive switch to IfAPI, to keep minimal changes
    to vendor branch, hoping in a next vendor update to it.
---
 net/realtek-re-kmod/Makefile                   |  6 ++++++
 net/realtek-re-kmod/files/extra-patch-if__re.c | 10 ++++++++++
 2 files changed, 16 insertions(+)

diff --git a/net/realtek-re-kmod/Makefile b/net/realtek-re-kmod/Makefile
index 0a6cffedba27..d97e36da6115 100644
--- a/net/realtek-re-kmod/Makefile
+++ b/net/realtek-re-kmod/Makefile
@@ -19,6 +19,12 @@ GH_ACCOUNT=	alexdupre
 GH_PROJECT=	rtl_bsd_drv
 GH_TAGNAME=	ea4ed1e
 
+.include <bsd.port.options.mk>
+
+.if ${OPSYS} == FreeBSD && (${OSVERSION} >= 1500000)
+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-if__re.c
+.endif
+
 PLIST_FILES=	${KMODDIR}/if_re.ko
 
 .include <bsd.port.mk>
diff --git a/net/realtek-re-kmod/files/extra-patch-if__re.c b/net/realtek-re-kmod/files/extra-patch-if__re.c
new file mode 100644
index 000000000000..0ca560fcafdb
--- /dev/null
+++ b/net/realtek-re-kmod/files/extra-patch-if__re.c
@@ -0,0 +1,10 @@
+--- if_re.c.orig	2024-06-04 09:39:04 UTC
++++ if_re.c
+@@ -67,6 +67,7 @@ __FBSDID("$FreeBSD: src/sys/dev/re/if_re.c,v " RE_VERS
+ 
+ #include <net/if.h>
+ #include <net/if_var.h>
++#include <net/if_private.h>
+ #include <net/if_arp.h>
+ #include <net/ethernet.h>
+ #include <net/if_dl.h>